summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-13 19:33:07 +0000
committerrubidium <rubidium@openttd.org>2009-12-13 19:33:07 +0000
commit0e78fdb54cd4805e5470e071e42ce17804efd02e (patch)
treebe409f44d9d3541384a30f0f7994df7351fd0bec /src/saveload
parent43abfbd426d7437535ecd8edf0d9c75990c6917b (diff)
downloadopenttd-0e78fdb54cd4805e5470e071e42ce17804efd02e.tar.xz
(svn r18486) -Fix: when switching language and you're getting a different font, recalculate the coordinates/sizes of the viewport signs. Otherwise it gets glitchy or abbreviated (in the smallmap)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 05c759846..39dcfde85 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -210,6 +210,16 @@ static inline RailType UpdateRailType(RailType rt, RailType min)
}
/**
+ * Update the viewport coordinates of all signs.
+ */
+void UpdateAllVirtCoords()
+{
+ UpdateAllStationVirtCoords();
+ UpdateAllSignVirtCoords();
+ UpdateAllTownVirtCoords();
+}
+
+/**
* Initialization of the windows and several kinds of caches.
* This is not done directly in AfterLoadGame because these
* functions require that all saveload conversions have been
@@ -224,12 +234,9 @@ static void InitializeWindowsAndCaches()
ResetWindowSystem();
SetupColoursAndInitialWindow();
- ResetViewportAfterLoadGame();
-
/* Update coordinates of the signs. */
- UpdateAllStationVirtCoords();
- UpdateAllSignVirtCoords();
- UpdateAllTownVirtCoords();
+ UpdateAllVirtCoords();
+ ResetViewportAfterLoadGame();
Company *c;
FOR_ALL_COMPANIES(c) {