changeset 18475:d4d01aaf7aa7 draft

(svn r23319) -Fix (r23316): Offsets of viewport signs were not scaled up.
author peter1138 <peter1138@openttd.org>
date Thu, 24 Nov 2011 17:37:20 +0000
parents 4a066afd127a
children a1ed9c6140cb
files src/signs.cpp src/station_cmd.cpp src/town_cmd.cpp src/waypoint_cmd.cpp
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/signs.cpp
+++ b/src/signs.cpp
@@ -47,7 +47,7 @@
 {
 	Point pt = RemapCoords(this->x, this->y, this->z);
 	SetDParam(0, this->index);
-	this->sign.UpdatePosition(pt.x, pt.y - 6, STR_WHITE_SIGN);
+	this->sign.UpdatePosition(pt.x, pt.y - 6 * ZOOM_LVL_BASE, STR_WHITE_SIGN);
 }
 
 /** Update the coordinates of all signs */
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -395,8 +395,8 @@
 {
 	Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
 
-	pt.y -= 32;
-	if ((this->facilities & FACIL_AIRPORT) && this->airport.type == AT_OILRIG) pt.y -= 16;
+	pt.y -= 32 * ZOOM_LVL_BASE;
+	if ((this->facilities & FACIL_AIRPORT) && this->airport.type == AT_OILRIG) pt.y -= 16 * ZOOM_LVL_BASE;
 
 	SetDParam(0, this->index);
 	SetDParam(1, this->facilities);
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -355,7 +355,7 @@
 	Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
 	SetDParam(0, this->index);
 	SetDParam(1, this->population);
-	this->sign.UpdatePosition(pt.x, pt.y - 24,
+	this->sign.UpdatePosition(pt.x, pt.y - 24 * ZOOM_LVL_BASE,
 		_settings_client.gui.population_in_label ? STR_VIEWPORT_TOWN_POP : STR_VIEWPORT_TOWN);
 
 	SetWindowDirty(WC_TOWN_VIEW, this->index);
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -38,7 +38,7 @@
 {
 	Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
 	SetDParam(0, this->index);
-	this->sign.UpdatePosition(pt.x, pt.y - 0x20, STR_VIEWPORT_WAYPOINT);
+	this->sign.UpdatePosition(pt.x, pt.y - 32 * ZOOM_LVL_BASE, STR_VIEWPORT_WAYPOINT);
 	/* Recenter viewport */
 	InvalidateWindowData(WC_WAYPOINT_VIEW, this->index);
 }