diff options
author | rubidium <rubidium@openttd.org> | 2009-07-08 08:30:35 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-08 08:30:35 +0000 |
commit | 8275a98e1f2e5adc770dc68492927416ddbb6fe6 (patch) | |
tree | cc2a2bbfd9544a2488bd50e8c798b1234ebb5c80 /src/waypoint_cmd.cpp | |
parent | 2d907d902ac830d3020fe21cea9299073577d7f3 (diff) | |
download | openttd-8275a98e1f2e5adc770dc68492927416ddbb6fe6.tar.xz |
(svn r16764) -Codechange: unify the way viewport signs are marked dirty
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index cb0129f43..986579c83 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -36,18 +36,6 @@ void UpdateWaypointSign(Waypoint *wp) } /** - * Redraw the sign of a waypoint - * @param wp Waypoint to redraw sign */ -void RedrawWaypointSign(const Waypoint *wp) -{ - MarkAllViewportsDirty( - wp->sign.left - 6, - wp->sign.top, - wp->sign.left + (wp->sign.width_1 << 2) + 12, - wp->sign.top + 48); -} - -/** * Set the default name for a waypoint * @param wp Waypoint to work on */ @@ -192,7 +180,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1 } } - RedrawWaypointSign(wp); + wp->sign.MarkDirty(); wp->xy = tile; InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index); } @@ -224,7 +212,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1 if (wp->town_index == INVALID_TOWN) MakeDefaultWaypointName(wp); UpdateWaypointSign(wp); - RedrawWaypointSign(wp); + wp->sign.MarkDirty(); YapfNotifyTrackLayoutChange(tile, AxisToTrack(axis)); } @@ -254,7 +242,7 @@ CommandCost RemoveTrainWaypoint(TileIndex tile, DoCommandFlag flags, bool justre wp = GetWaypointByTile(tile); wp->deleted = 30; // let it live for this many days before we do the actual deletion. - RedrawWaypointSign(wp); + wp->sign.MarkDirty(); Train *v = NULL; if (justremove) { |