(svn r955) Replace uint16 for orders with struct Order

This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read.
This changes preserves binary compatibility wrt savegames.
This commit is contained in:
tron
2004-12-05 12:43:04 +00:00
parent a39770f23a
commit b8e83ca03f
20 changed files with 582 additions and 441 deletions

View File

@@ -760,8 +760,12 @@ int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
static void DoDeleteWaypoint(Waypoint *cp)
{
Order order;
cp->xy = 0;
DeleteCommandFromVehicleSchedule(((cp-_waypoints) << 8) + OT_GOTO_WAYPOINT);
order.type = OT_GOTO_WAYPOINT;
order.flags = 0;
order.station = cp - _waypoints;
DeleteCommandFromVehicleSchedule(order);
if (~cp->town_or_string & 0xC000) DeleteName(cp->town_or_string);
RedrawWaypointSign(cp);
}