summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-22 22:54:49 +0000
committerrubidium <rubidium@openttd.org>2007-11-22 22:54:49 +0000
commit9d3cc5b2718c43e6960733b334682be9e663ba9a (patch)
tree0216ff8b8009ef1fb4b0408f801d8862017b14c0 /src
parentb979995795e2898ecd6c1294cbfa2de9b9b6001a (diff)
downloadopenttd-9d3cc5b2718c43e6960733b334682be9e663ba9a.tar.xz
(svn r11495) -Fix (r11493): some compilers fail to show warnings when they should.
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 54580cf12..8f5da9934 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1246,8 +1246,6 @@ static inline RailType UpdateRailType(RailType rt, RailType min)
bool AfterLoadGame()
{
TileIndex map_size = MapSize();
- Window *w;
- ViewPort *vp;
Player *p;
/* in version 2.1 of the savegame, town owner was unified. */
@@ -1345,9 +1343,6 @@ bool AfterLoadGame()
if (!_players[0].is_active && (!_networking || (_networking && _network_server && !_network_dedicated)))
DoStartupNewPlayer(false);
- DoZoomInOutWindow(ZOOM_NONE, w); // update button status
- MarkWholeScreenDirty();
-
if (CheckSavegameVersion(72)) {
/* Locks/shiplifts in very old savegames had OWNER_WATER as owner */
for (TileIndex t = 0; t < MapSize(); t++) {
@@ -2195,18 +2190,21 @@ bool AfterLoadGame()
ResetWindowSystem();
SetupColorsAndInitialWindow();
- w = FindWindowById(WC_MAIN_WINDOW, 0);
+ Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
- WP(w,vp_d).scrollpos_x = _saved_scrollpos_x;
- WP(w,vp_d).scrollpos_y = _saved_scrollpos_y;
- WP(w,vp_d).dest_scrollpos_x = _saved_scrollpos_x;
- WP(w,vp_d).dest_scrollpos_y = _saved_scrollpos_y;
+ WP(w, vp_d).scrollpos_x = _saved_scrollpos_x;
+ WP(w, vp_d).scrollpos_y = _saved_scrollpos_y;
+ WP(w, vp_d).dest_scrollpos_x = _saved_scrollpos_x;
+ WP(w, vp_d).dest_scrollpos_y = _saved_scrollpos_y;
- vp = w->viewport;
+ ViewPort *vp = w->viewport;
vp->zoom = (ZoomLevel)min(_saved_scrollpos_zoom, ZOOM_LVL_MAX);
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
+ DoZoomInOutWindow(ZOOM_NONE, w); // update button status
+ MarkWholeScreenDirty();
+
/* Recalculate */
Group *g;
FOR_ALL_GROUPS(g) {