summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-07-28 21:51:00 +0000
committerbelugas <belugas@openttd.org>2006-07-28 21:51:00 +0000
commitecc89d596597d7e450b69370233d6f23fa5728cf (patch)
tree4a45bd28895269309999ea98b29f0c87389e361c /openttd.c
parente1654fa0171ea37be93e72ec7ef51d6b2543a6d7 (diff)
downloadopenttd-ecc89d596597d7e450b69370233d6f23fa5728cf.tar.xz
(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
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c14
1 files changed, 1 insertions, 13 deletions
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) {