summaryrefslogtreecommitdiff
path: root/src/industrytype.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-02-07 12:04:44 +0000
committerfrosch <frosch@openttd.org>2010-02-07 12:04:44 +0000
commitfb9b833dc49674ffa98402cb6a66347e0fd8eef5 (patch)
treec67ae3626e8301a6119b320a781592e540296916 /src/industrytype.h
parent76dbdca2f87fcd1cbbc6364a2082d63ed2209761 (diff)
downloadopenttd-fb9b833dc49674ffa98402cb6a66347e0fd8eef5.tar.xz
(svn r19053) -Codechange: Add an enum for the special flags of industry tiles. (based on andythenorth' work)
Diffstat (limited to 'src/industrytype.h')
-rw-r--r--src/industrytype.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/industrytype.h b/src/industrytype.h
index f4834a6cf..ff85e45d9 100644
--- a/src/industrytype.h
+++ b/src/industrytype.h
@@ -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;
};