5 #ifndef NEWGRF_STATION_H |
5 #ifndef NEWGRF_STATION_H |
6 #define NEWGRF_STATION_H |
6 #define NEWGRF_STATION_H |
7 |
7 |
8 #include "engine.h" |
8 #include "engine.h" |
9 #include "newgrf_cargo.h" |
9 #include "newgrf_cargo.h" |
|
10 #include "helpers.hpp" |
10 |
11 |
11 typedef enum { |
12 typedef enum { |
12 STAT_CLASS_DFLT, ///< Default station class. |
13 STAT_CLASS_BEGIN = 0, ///< the lowest valid value |
13 STAT_CLASS_WAYP, ///< Waypoint class. |
14 STAT_CLASS_DFLT = 0, ///< Default station class. |
14 STAT_CLASS_MAX = 32, ///< Maximum number of classes. |
15 STAT_CLASS_WAYP, ///< Waypoint class. |
|
16 STAT_CLASS_MAX = 32, ///< Maximum number of classes. |
15 } StationClassID; |
17 } StationClassID; |
|
18 |
|
19 /** Define basic enum properties */ |
|
20 template <> struct EnumPropsT<StationClassID> : MakeEnumPropsT<StationClassID, byte, STAT_CLASS_BEGIN, STAT_CLASS_MAX, STAT_CLASS_MAX> {}; |
|
21 typedef TinyEnumT<StationClassID> StationClassIDByte; |
|
22 |
|
23 /** Allow incrementing of StationClassID variables */ |
|
24 DECLARE_POSTFIX_INCREMENT(StationClassID); |
16 |
25 |
17 /* Station layout for given dimensions - it is a two-dimensional array |
26 /* Station layout for given dimensions - it is a two-dimensional array |
18 * where index is computed as (x * platforms) + platform. */ |
27 * where index is computed as (x * platforms) + platform. */ |
19 typedef byte *StationLayout; |
28 typedef byte *StationLayout; |
20 |
29 |