diff options
Diffstat (limited to 'src/newgrf_station.h')
-rw-r--r-- | src/newgrf_station.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/newgrf_station.h b/src/newgrf_station.h index a133fb3d7..f504bdd2b 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -7,13 +7,22 @@ #include "engine.h" #include "newgrf_cargo.h" +#include "helpers.hpp" typedef enum { - STAT_CLASS_DFLT, ///< Default station class. - STAT_CLASS_WAYP, ///< Waypoint class. - STAT_CLASS_MAX = 32, ///< Maximum number of classes. + STAT_CLASS_BEGIN = 0, ///< the lowest valid value + STAT_CLASS_DFLT = 0, ///< Default station class. + STAT_CLASS_WAYP, ///< Waypoint class. + STAT_CLASS_MAX = 32, ///< Maximum number of classes. } StationClassID; +/** Define basic enum properties */ +template <> struct EnumPropsT<StationClassID> : MakeEnumPropsT<StationClassID, byte, STAT_CLASS_BEGIN, STAT_CLASS_MAX, STAT_CLASS_MAX> {}; +typedef TinyEnumT<StationClassID> StationClassIDByte; + +/** Allow incrementing of StationClassID variables */ +DECLARE_POSTFIX_INCREMENT(StationClassID); + /* Station layout for given dimensions - it is a two-dimensional array * where index is computed as (x * platforms) + platform. */ typedef byte *StationLayout; |