summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/misc_sl.cpp3
-rw-r--r--src/saveload/saveload_internal.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp
index 052c63360..b6a4c5b9b 100644
--- a/src/saveload/misc_sl.cpp
+++ b/src/saveload/misc_sl.cpp
@@ -29,6 +29,7 @@ extern TileIndex _cur_tileloop_tile;
/* Keep track of current game position */
int _saved_scrollpos_x;
int _saved_scrollpos_y;
+ZoomLevelByte _saved_scrollpos_zoom;
void SaveViewportBeforeSaveGame()
{
@@ -51,7 +52,7 @@ void ResetViewportAfterLoadGame()
w->viewport->dest_scrollpos_y = _saved_scrollpos_y;
ViewPort *vp = w->viewport;
- vp->zoom = min(_saved_scrollpos_zoom, ZOOM_LVL_MAX);
+ vp->zoom = min<ZoomLevel>(_saved_scrollpos_zoom, ZOOM_LVL_MAX);
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
diff --git a/src/saveload/saveload_internal.h b/src/saveload/saveload_internal.h
index 6e7a6e1d7..03912c673 100644
--- a/src/saveload/saveload_internal.h
+++ b/src/saveload/saveload_internal.h
@@ -45,6 +45,7 @@ void CopyTempEngineData();
extern int32 _saved_scrollpos_x;
extern int32 _saved_scrollpos_y;
+extern ZoomLevelByte _saved_scrollpos_zoom;
extern SavegameType _savegame_type;
extern uint32 _ttdp_version;