diff options
author | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
commit | f35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch) | |
tree | 1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/newgrf_station.h | |
parent | a332d10fd938f345fff18e5f4a662a58f692f734 (diff) | |
download | openttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz |
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
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; |