diff options
author | belugas <belugas@openttd.org> | 2006-04-12 18:10:54 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-04-12 18:10:54 +0000 |
commit | 0a9d5f051f5da5aa6f7bbe67e9f3012ad6413b30 (patch) | |
tree | cefc001d3c5fbe2a7212f0846fe516d01984f6c7 /industry_map.h | |
parent | a588d816ff30dad15ad080315862b611f56516b8 (diff) | |
download | openttd-0a9d5f051f5da5aa6f7bbe67e9f3012ad6413b30.tar.xz |
(svn r4399) CodeChange : Add and make use of [G|S]etIndustryAnimationLoop accessors.
Diffstat (limited to 'industry_map.h')
-rw-r--r-- | industry_map.h | 25 |
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 */ |