(svn r19053) -Codechange: Add an enum for the special flags of industry tiles. (based on andythenorth' work)

This commit is contained in:
frosch
2010-02-07 12:04:44 +00:00
parent 76dbdca2f8
commit fb9b833dc4
4 changed files with 13 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ enum IndustryConstructionType {
ICT_SCENARIO_EDITOR ///< while scenarion edition
};
/** Various industry behaviours mostly to represent original TTD specialities */
enum IndustryBehaviour {
INDUSTRYBEH_NONE = 0,
INDUSTRYBEH_PLANT_FIELDS = 1 << 0, ///< periodically plants fileds around itself (temp and artic farms)
@@ -79,6 +80,13 @@ enum IndustryBehaviour {
};
DECLARE_ENUM_AS_BIT_SET(IndustryBehaviour);
/** Flags for miscellaneous industry tile specialities */
enum IndustryTileSpecialFlags {
INDTILE_SPECIAL_NONE = 0,
INDTILE_SPECIAL_NEXTFRAME_RANDOMBITS = 1 << 0, ///< Callback 0x26 needs random bits
};
DECLARE_ENUM_AS_BIT_SET(IndustryTileSpecialFlags);
struct IndustryTileTable {
TileIndexDiffC ti;
IndustryGfx gfx;
@@ -167,7 +175,7 @@ struct IndustryTileSpec {
uint16 animation_info; ///< Information about the animation (is it looping, how many loops etc)
uint8 animation_speed; ///< The speed of the animation
uint8 animation_triggers; ///< When to start the animation
uint8 animation_special_flags; ///< Extra flags to influence the animation
IndustryTileSpecialFlags special_flags; ///< Bitmask of extra flags used by the tile
bool enabled; ///< entity still avaible (by default true).newgrf can disable it, though
struct GRFFileProps grf_prop;
};