From ecc89d596597d7e450b69370233d6f23fa5728cf Mon Sep 17 00:00:00 2001 From: belugas Date: Fri, 28 Jul 2006 21:51:00 +0000 Subject: (svn r5626) CodeChange : Remove the global _make_screenshot and implement a more flexible mechanism Simplification of the handling of the main_gui menus, Removal of repetitions and Hiding the internals of screenshots. Thanks to glx, Rubidium and Truelight for pointers --- openttd.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'openttd.c') diff --git a/openttd.c b/openttd.c index f1352ae19..a711a29fa 100644 --- a/openttd.c +++ b/openttd.c @@ -936,19 +936,7 @@ void GameLoop(void) if (_dirkeys) HandleKeyScrolling(); // make a screenshot? - 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; - } + if (IsScreenshotRequested()) ShowScreenshotResult(MakeScreenshot()); // switch game mode? if (_switch_mode != SM_NONE) { -- cgit v1.2.3-70-g09d2