(svn r4399) CodeChange : Add and make use of [G|S]etIndustryAnimationLoop accessors.

This commit is contained in:
belugas
2006-04-12 18:10:54 +00:00
parent 9aa247b0b4
commit b0906708a0
2 changed files with 44 additions and 16 deletions

View File

@@ -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 */