mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r101) New cheat: switch climate
This commit is contained in:
parent
287dcdc779
commit
85012a519c
|
@ -1025,6 +1025,10 @@ STR_CONFIG_PATCHES_CURRENCY :{CURRENCY}
|
|||
|
||||
STR_CONFIG_PATCHES_QUERY_CAPT :{WHITE}Change setting value
|
||||
|
||||
STR_TEMPERATE_LANDSCAPE :temperate landscape
|
||||
STR_SUB_ARCTIC_LANDSCAPE :sub-arctic landscape
|
||||
STR_SUB_TROPICAL_LANDSCAPE :sub-tropical landscape
|
||||
STR_TOYLAND_LANDSCAPE :toyland landscape
|
||||
|
||||
STR_CHEATS :{WHITE}Cheats
|
||||
STR_CHEATS_TIP :{BLACK}Checkboxes indicate if you have used this cheat before
|
||||
|
@ -1035,6 +1039,7 @@ STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Magic bulldozer (remove industries, unmovabl
|
|||
STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Tunnels may cross each other: {ORANGE}{STRING}
|
||||
STR_CHEAT_BUILD_IN_PAUSE :{LTBLUE}Build while in pause mode: {ORANGE}{STRING}
|
||||
STR_CHEAT_NO_JETCRASH :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE} {STRING}
|
||||
STR_CHEAT_SWITCH_CLIMATE :{LTBLUE}Switch climate: {ORANGE} {STRING}
|
||||
|
||||
STR_SORT_BY_POPULATION :{BLACK}Population
|
||||
|
||||
|
|
19
misc_gui.c
19
misc_gui.c
|
@ -1345,6 +1345,16 @@ int32 ClickChangePlayerCheat(int32 p1, int32 p2)
|
|||
return _local_player;
|
||||
}
|
||||
|
||||
// p1 -1 or +1 (down/up)
|
||||
int32 ClickChangeClimateCheat(int32 p1, int32 p2)
|
||||
{
|
||||
_opt.landscape = p1;
|
||||
GfxLoadSprites();
|
||||
MarkWholeScreenDirty();
|
||||
return _opt.landscape;
|
||||
}
|
||||
|
||||
|
||||
typedef int32 CheckButtonClick(int32, int32);
|
||||
static CheckButtonClick * const _cheat_button_proc[] = {
|
||||
ClickMoneyCheat,
|
||||
|
@ -1415,8 +1425,9 @@ static const CheatEntry _cheats_ui[] = {
|
|||
{CE_UINT8, 0, STR_CHEAT_CHANGE_PLAYER, &_local_player, &_cheats.switch_player.been_used, &ClickChangePlayerCheat, 0, 11, 1},
|
||||
{CE_BOOL, 0, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used},
|
||||
{CE_BOOL, 0, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value,&_cheats.crossing_tunnels.been_used},
|
||||
{CE_BOOL, 0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used},
|
||||
{CE_BOOL, 0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used},
|
||||
{CE_BOOL, 0, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used},
|
||||
{CE_UINT8, 0, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat, 0, 3, 1},
|
||||
};
|
||||
|
||||
|
||||
|
@ -1470,13 +1481,17 @@ static void CheatsWndProc(Window *w, WindowEvent *e)
|
|||
DrawStringCentered(x+35, y+1, STR_681A, 0);
|
||||
|
||||
val = ReadCE(ce);
|
||||
|
||||
// set correct string for switch climate cheat
|
||||
if(ce->str==STR_CHEAT_SWITCH_CLIMATE)
|
||||
val += STR_TEMPERATE_LANDSCAPE;
|
||||
|
||||
SET_DPARAM16(0, val);
|
||||
|
||||
// draw colored flag for change player cheat
|
||||
if(ce->str==STR_CHEAT_CHANGE_PLAYER)
|
||||
DrawPlayerIcon(_current_player, 156, y+2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
DrawString(50, y+1, ce->str, 0);
|
||||
|
|
|
@ -177,8 +177,9 @@ typedef struct Cheats {
|
|||
Cheat switch_player; // change to another player
|
||||
Cheat money; // get rich
|
||||
Cheat crossing_tunnels; // allow tunnels that cross each other
|
||||
Cheat build_in_pause; // build while in pause mode
|
||||
Cheat no_jetcrash; // no jet will crash on small airports anymore
|
||||
Cheat build_in_pause; // build while in pause mode
|
||||
Cheat no_jetcrash; // no jet will crash on small airports anymore
|
||||
Cheat switch_climate;
|
||||
} Cheats;
|
||||
|
||||
VARDEF Cheats _cheats;
|
||||
|
|
Loading…
Reference in New Issue