(svn r23319) -Fix (r23316): Offsets of viewport signs were not scaled up.

This commit is contained in:
peter1138 2011-11-24 17:37:20 +00:00
parent 7337e7ff49
commit 3e1d070413
4 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@ void Sign::UpdateVirtCoord()
{ {
Point pt = RemapCoords(this->x, this->y, this->z); Point pt = RemapCoords(this->x, this->y, this->z);
SetDParam(0, this->index); 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 */ /** Update the coordinates of all signs */

View File

@ -395,8 +395,8 @@ void Station::UpdateVirtCoord()
{ {
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE); Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
pt.y -= 32; pt.y -= 32 * ZOOM_LVL_BASE;
if ((this->facilities & FACIL_AIRPORT) && this->airport.type == AT_OILRIG) pt.y -= 16; if ((this->facilities & FACIL_AIRPORT) && this->airport.type == AT_OILRIG) pt.y -= 16 * ZOOM_LVL_BASE;
SetDParam(0, this->index); SetDParam(0, this->index);
SetDParam(1, this->facilities); SetDParam(1, this->facilities);

View File

@ -355,7 +355,7 @@ void Town::UpdateVirtCoord()
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE); Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
SetDParam(0, this->index); SetDParam(0, this->index);
SetDParam(1, this->population); 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); _settings_client.gui.population_in_label ? STR_VIEWPORT_TOWN_POP : STR_VIEWPORT_TOWN);
SetWindowDirty(WC_TOWN_VIEW, this->index); SetWindowDirty(WC_TOWN_VIEW, this->index);

View File

@ -38,7 +38,7 @@ void Waypoint::UpdateVirtCoord()
{ {
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE); Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
SetDParam(0, this->index); 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 */ /* Recenter viewport */
InvalidateWindowData(WC_WAYPOINT_VIEW, this->index); InvalidateWindowData(WC_WAYPOINT_VIEW, this->index);
} }