diff options
author | rubidium <rubidium@openttd.org> | 2009-11-30 11:29:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-30 11:29:52 +0000 |
commit | 5a41a646c2f62bbd3480f5714232f9e2e48ae75c (patch) | |
tree | 3d9752635989778475d604972cc7abb06df8d7a3 /src/saveload | |
parent | 9ecfcdff78d68da1ccfc97236a64079d1c4c0eac (diff) | |
download | openttd-5a41a646c2f62bbd3480f5714232f9e2e48ae75c.tar.xz |
(svn r18351) -Fix [FS#3333]: endianness issue with saving the zoom level
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/misc_sl.cpp | 3 | ||||
-rw-r--r-- | src/saveload/saveload_internal.h | 1 |
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; |