mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
(svn r3604) Remove two unnecessary local variables
This commit is contained in:
parent
b5b4491471
commit
a2acfb51ed
24
openttd.c
24
openttd.c
@ -675,22 +675,22 @@ static void StartScenario(void)
|
||||
bool SafeSaveOrLoad(const char *filename, int mode, int newgm)
|
||||
{
|
||||
byte ogm = _game_mode;
|
||||
int r;
|
||||
|
||||
_game_mode = newgm;
|
||||
r = SaveOrLoad(filename, mode);
|
||||
if (r == SL_REINIT) {
|
||||
switch (SaveOrLoad(filename, mode)) {
|
||||
case SL_OK: return true;
|
||||
|
||||
case SL_REINIT:
|
||||
switch (ogm) {
|
||||
case GM_MENU: LoadIntroGame(); break;
|
||||
case GM_EDITOR: MakeNewEditorWorld(); break;
|
||||
default: MakeNewGame(); break;
|
||||
}
|
||||
return false;
|
||||
} else if (r != SL_OK) {
|
||||
|
||||
default:
|
||||
_game_mode = ogm;
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -916,7 +916,6 @@ static void HandleKeyScrolling(void)
|
||||
|
||||
void GameLoop(void)
|
||||
{
|
||||
int m;
|
||||
ThreadMsg message;
|
||||
|
||||
if ((message = OTTD_PollThreadEvent()) != 0) ProcessSentMessage(message);
|
||||
@ -932,23 +931,24 @@ void GameLoop(void)
|
||||
if (_dirkeys) HandleKeyScrolling();
|
||||
|
||||
// make a screenshot?
|
||||
if ((m=_make_screenshot) != 0) {
|
||||
_make_screenshot = 0;
|
||||
switch(m) {
|
||||
if (_make_screenshot != 0) {
|
||||
switch (_make_screenshot) {
|
||||
case 1: // make small screenshot
|
||||
UndrawMouseCursor();
|
||||
ShowScreenshotResult(MakeScreenshot());
|
||||
break;
|
||||
|
||||
case 2: // make large screenshot
|
||||
ShowScreenshotResult(MakeWorldScreenshot(-(int)MapMaxX() * TILE_PIXELS, 0, (MapMaxX() + MapMaxY()) * TILE_PIXELS, (MapMaxX() + MapMaxY()) * TILE_PIXELS >> 1, 0));
|
||||
break;
|
||||
}
|
||||
_make_screenshot = 0;
|
||||
}
|
||||
|
||||
// switch game mode?
|
||||
if ((m=_switch_mode) != SM_NONE) {
|
||||
if (_switch_mode != SM_NONE) {
|
||||
SwitchMode(_switch_mode);
|
||||
_switch_mode = SM_NONE;
|
||||
SwitchMode(m);
|
||||
}
|
||||
|
||||
IncreaseSpriteLRU();
|
||||
|
Loading…
Reference in New Issue
Block a user