summaryrefslogtreecommitdiff
path: root/industry_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'industry_map.h')
-rw-r--r--industry_map.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/industry_map.h b/industry_map.h
index a734d792b..c31ef4087 100644
--- a/industry_map.h
+++ b/industry_map.h
@@ -78,7 +78,7 @@ static inline void SetIndustryGfx(TileIndex t, IndustryGfx gfx)
_m[t].m5 = gfx;
}
-static inline void MakeIndustry(TileIndex t, uint index, uint gfx)
+static inline void MakeIndustry(TileIndex t, uint index, IndustryGfx gfx)
{
SetTileType(t, MP_INDUSTRY);
_m[t].m1 = 0;
@@ -170,4 +170,27 @@ static const IndustryTypeSolver industry_gfx_Solver [IT_END] = {
{167, 174} //IT_SUGAR_MINE,
};
+/**
+ * Get the animation loop number
+ * @param tile the tile to get the animation loop number of
+ * @pre IsTileType(tile, MP_INDUSTRY
+ */
+static inline byte GetIndustryAnimationLoop(TileIndex tile)
+{
+ assert(IsTileType(tile, MP_INDUSTRY));
+ return _m[tile].m4;
+}
+
+/**
+ * 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
+ */
+static inline void SetIndustryAnimationLoop(TileIndex tile, byte count)
+{
+ assert(IsTileType(tile, MP_INDUSTRY));
+ _m[tile].m4 = count;
+}
+
#endif /* INDUSTRY_MAP_H */