(svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords.

This commit is contained in:
rubidium
2009-07-13 22:33:25 +00:00
parent a2ce1e6e8f
commit 79deeee323
15 changed files with 51 additions and 53 deletions

View File

@@ -26,13 +26,13 @@
#include "table/strings.h"
/**
* Update the sign for the waypoint
* @param wp Waypoint to update sign */
void UpdateWaypointSign(Waypoint *wp)
* Update the virtual coords needed to draw the waypoint sign.
*/
void Waypoint::UpdateVirtCoord()
{
Point pt = RemapCoords2(TileX(wp->xy) * TILE_SIZE, TileY(wp->xy) * TILE_SIZE);
SetDParam(0, wp->index);
wp->sign.UpdatePosition(pt.x, pt.y - 0x20, STR_WAYPOINT_VIEWPORT);
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_WAYPOINT_VIEWPORT);
}
/**
@@ -211,7 +211,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1
if (wp->town_index == INVALID_TOWN) MakeDefaultWaypointName(wp);
UpdateWaypointSign(wp);
wp->UpdateVirtCoord();
wp->sign.MarkDirty();
YapfNotifyTrackLayoutChange(tile, AxisToTrack(axis));
}
@@ -319,7 +319,7 @@ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
wp->name = strdup(text);
}
UpdateWaypointSign(wp);
wp->UpdateVirtCoord();
MarkWholeScreenDirty();
}
return CommandCost();