industry_map.h
branchcustombridgeheads
changeset 5623 ef2a8a524a95
parent 4583 45b8bf91b1e3
--- a/industry_map.h	Mon Jan 01 16:10:01 2007 +0000
+++ b/industry_map.h	Mon Jan 01 16:31:13 2007 +0000
@@ -48,6 +48,7 @@
 	GFX_BUBBLE_CATCHER                 = 162,
 	GFX_TOFFEE_QUARY                   = 165,
 	GFX_SUGAR_MINE_SIEVE               = 174,
+	NUM_INDUSTRY_GFXES                 = 175,
 };
 
 static inline IndustryID GetIndustryIndex(TileIndex t)
@@ -212,7 +213,7 @@
 /**
  * Get the animation loop number
  * @param tile the tile to get the animation loop number of
- * @pre IsTileType(tile, MP_INDUSTRY
+ * @pre IsTileType(tile, MP_INDUSTRY)
  */
 static inline byte GetIndustryAnimationLoop(TileIndex tile)
 {
@@ -224,7 +225,7 @@
  * Set the animation loop number
  * @param tile the tile to set the animation loop number of
  * @param count the new animation frame number
- * @pre IsTileType(tile, MP_INDUSTRY
+ * @pre IsTileType(tile, MP_INDUSTRY)
  */
 static inline void SetIndustryAnimationLoop(TileIndex tile, byte count)
 {
@@ -232,4 +233,27 @@
 	_m[tile].m4 = count;
 }
 
+/**
+ * Get the animation state
+ * @param tile the tile to get the animation state of
+ * @pre IsTileType(tile, MP_INDUSTRY)
+ */
+static inline byte GetIndustryAnimationState(TileIndex tile)
+{
+	assert(IsTileType(tile, MP_INDUSTRY));
+	return _m[tile].m3;
+}
+
+/**
+ * Set the animation state
+ * @param tile the tile to set the animation state of
+ * @param count the new animation state
+ * @pre IsTileType(tile, MP_INDUSTRY)
+ */
+static inline void SetIndustryAnimationState(TileIndex tile, byte state)
+{
+	assert(IsTileType(tile, MP_INDUSTRY));
+	_m[tile].m3 = state;
+}
+
 #endif /* INDUSTRY_MAP_H */