summaryrefslogtreecommitdiff
path: root/station.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-03-25 10:40:58 +0000
committercelestar <celestar@openttd.org>2005-03-25 10:40:58 +0000
commit6e142d523edcd9c96680593bc0bb4a20d23e8211 (patch)
treeb99ea2d10af8a39dcea0b127199ec01311d05575 /station.h
parent75bc6cd7e78e91651fa737eefbae7fbf3b9be3d7 (diff)
downloadopenttd-6e142d523edcd9c96680593bc0bb4a20d23e8211.tar.xz
(svn r2055) -CodeChange: Begun introducting StationID
Diffstat (limited to 'station.h')
-rw-r--r--station.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/station.h b/station.h
index 6b144df15..bb1fe66ce 100644
--- a/station.h
+++ b/station.h
@@ -28,13 +28,15 @@ enum {
ROAD_STOP_LIMIT = 8,
};
+typedef uint16 StationID;
+
typedef struct RoadStop {
TileIndex xy;
bool used;
byte status;
uint32 index;
uint16 slot[NUM_SLOTS];
- uint16 station; //XXX should be StationIndex
+ StationID station;
uint8 type;
struct RoadStop *next;
struct RoadStop *prev;
@@ -72,7 +74,7 @@ struct Station {
//uint16 airport_flags;
uint32 airport_flags;
- uint16 index;
+ StationID index;
VehicleID last_vehicle;
GoodsEntry goods[NUM_CARGO];
@@ -131,7 +133,7 @@ extern MemoryPool _station_pool;
/**
* Get the pointer to the station with index 'index'
*/
-static inline Station *GetStation(uint index)
+static inline Station *GetStation(StationID index)
{
return (Station*)GetItemFromPool(&_station_pool, index);
}