diff options
-rw-r--r-- | openttd.h | 2 | ||||
-rw-r--r-- | order.h | 4 | ||||
-rw-r--r-- | order_cmd.c | 10 | ||||
-rw-r--r-- | vehicle.h | 4 |
4 files changed, 10 insertions, 10 deletions
@@ -42,7 +42,7 @@ typedef uint16 IndustryID; typedef uint16 DepotID; typedef uint16 WaypointID; typedef byte PlayerID; -typedef byte OrderID; +typedef byte VehicleOrderID; ///< The index of an order within its current vehicle (not pool related) typedef byte CargoID; typedef byte LandscapeID; typedef uint16 StringID; @@ -89,7 +89,7 @@ typedef struct Order { typedef struct { VehicleID clone; - OrderID orderindex; + VehicleOrderID orderindex; Order order[MAX_BACKUP_ORDER_COUNT + 1]; uint16 service_interval; char name[32]; @@ -116,7 +116,7 @@ static inline uint16 GetOrderPoolSize(void) return _order_pool.total_items; } -static inline OrderID GetOrderArraySize(void) +static inline VehicleOrderID GetOrderArraySize(void) { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that diff --git a/order_cmd.c b/order_cmd.c index e4d478caf..fb6d26a99 100644 --- a/order_cmd.c +++ b/order_cmd.c @@ -176,7 +176,7 @@ int32 CmdInsertOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Vehicle *v; VehicleID veh = GB(p1, 0, 16); - OrderID sel_ord = GB(p1, 16, 16); + VehicleOrderID sel_ord = GB(p1, 16, 16); Order new_order = UnpackOrder(p2); if (!IsValidVehicleID(veh)) return CMD_ERROR; @@ -438,7 +438,7 @@ int32 CmdDeleteOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Vehicle *v, *u; VehicleID veh_id = p1; - OrderID sel_ord = p2; + VehicleOrderID sel_ord = p2; Order *order; if (!IsValidVehicleID(veh_id)) return CMD_ERROR; @@ -523,7 +523,7 @@ int32 CmdSkipOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { /* Goto next order */ - OrderID b = v->cur_order_index + 1; + VehicleOrderID b = v->cur_order_index + 1; if (b >= v->num_orders) b = 0; v->cur_order_index = b; @@ -561,7 +561,7 @@ int32 CmdModifyOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Vehicle *v; Order *order; - OrderID sel_ord = GB(p1, 16, 16); // XXX - automatically truncated to 8 bits. + VehicleOrderID sel_ord = GB(p1, 16, 16); // XXX - automatically truncated to 8 bits. VehicleID veh = GB(p1, 0, 16); if (!IsValidVehicleID(veh)) return CMD_ERROR; @@ -845,7 +845,7 @@ void RestoreVehicleOrders(const Vehicle* v, const BackuppedOrders* bak) int32 CmdRestoreOrderIndex(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { Vehicle *v; - OrderID cur_ord = GB(p2, 0, 16); + VehicleOrderID cur_ord = GB(p2, 0, 16); uint16 serv_int = GB(p2, 16, 16); if (!IsValidVehicleID(p1)) return CMD_ERROR; @@ -190,10 +190,10 @@ struct Vehicle { /* Begin Order-stuff */ Order current_order; ///< The current order (+ status, like: loading) - OrderID cur_order_index; ///< The index to the current order + VehicleOrderID cur_order_index; ///< The index to the current order Order *orders; ///< Pointer to the first order for this vehicle - OrderID num_orders; ///< How many orders there are in the list + VehicleOrderID num_orders; ///< How many orders there are in the list Vehicle *next_shared; ///< If not NULL, this points to the next vehicle that shared the order Vehicle *prev_shared; ///< If not NULL, this points to the prev vehicle that shared the order |