From e067d4a4b87d2c4b4fa92f24d241a88cb8432e38 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 13 Jul 2009 22:33:25 +0000 Subject: (svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords. --- src/waypoint_cmd.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/waypoint_cmd.cpp') diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 986579c83..e2ad292ba 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -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(); -- cgit v1.2.3-54-g00ecf