(svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords.
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user