55 typedef uint16 DepotID; |
55 typedef uint16 DepotID; |
56 typedef uint16 WaypointID; |
56 typedef uint16 WaypointID; |
57 typedef uint16 OrderID; |
57 typedef uint16 OrderID; |
58 typedef uint16 SignID; |
58 typedef uint16 SignID; |
59 typedef uint16 EngineRenewID; |
59 typedef uint16 EngineRenewID; |
60 |
60 typedef uint16 DestinationID; |
61 typedef union DestinationID { |
61 |
62 StationID station; |
62 /* DestinationID must be at least as large as every these below, because it can |
63 DepotID depot; |
63 * be any of them |
64 WaypointID waypoint; |
64 */ |
65 uint16 disaster; ///< Please don't ask about it, but disasters uses orders to store stuff... |
65 assert_compile(sizeof(DestinationID) == sizeof(DepotID)); |
66 } DestinationID; |
66 assert_compile(sizeof(DestinationID) == sizeof(WaypointID)); |
67 |
67 assert_compile(sizeof(DestinationID) == sizeof(StationID)); |
68 /* All items of DestinationID has to be of the same size, because some part |
|
69 * of the code depends on the fact that DestinationID is the same for all |
|
70 * items inside DestinationID. Check PackOrder() */ |
|
71 assert_compile(sizeof(StationID) == sizeof(DepotID)); |
|
72 assert_compile(sizeof(StationID) == sizeof(WaypointID)); |
|
73 assert_compile(sizeof(StationID) == sizeof(uint16)); |
|
74 |
68 |
75 typedef uint32 WindowNumber; |
69 typedef uint32 WindowNumber; |
76 typedef byte WindowClass; |
70 typedef byte WindowClass; |
77 |
71 |
78 enum { |
72 enum { |