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
commite4474db35f192ab0f4fbf4c0dfe6a8624bf77b33 (patch)
tree4a45bd28895269309999ea98b29f0c87389e361c /openttd.c
parentee91a457182a81d830f019357a5950b3b8139268 (diff)
downloadopenttd-e4474db35f192ab0f4fbf4c0dfe6a8624bf77b33.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) {