summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 0622f85a3..0d97d8cd0 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2785,33 +2785,3 @@ void ResetObjectToPlace()
{
SetObjectToPlace(SPR_CURSOR_MOUSE, PAL_NONE, VHM_NONE, WC_MAIN_WINDOW, 0);
}
-
-
-void SaveViewportBeforeSaveGame()
-{
- const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
-
- if (w != NULL) {
- _saved_scrollpos_x = w->viewport->scrollpos_x;
- _saved_scrollpos_y = w->viewport->scrollpos_y;
- _saved_scrollpos_zoom = w->viewport->zoom;
- }
-}
-
-void ResetViewportAfterLoadGame()
-{
- Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
-
- w->viewport->scrollpos_x = _saved_scrollpos_x;
- w->viewport->scrollpos_y = _saved_scrollpos_y;
- w->viewport->dest_scrollpos_x = _saved_scrollpos_x;
- w->viewport->dest_scrollpos_y = _saved_scrollpos_y;
-
- ViewPort *vp = w->viewport;
- vp->zoom = 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();
-}