summaryrefslogtreecommitdiff
path: root/industry_map.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-30 11:57:52 +0000
committerrubidium <rubidium@openttd.org>2006-12-30 11:57:52 +0000
commit5f88e816416ee78b3b693253c0ff298c36459a8b (patch)
tree208ddbfdccba148fd9aa969b5124fe9c495ba540 /industry_map.h
parentc7b1fd6fc2dd73e9b9bf150b5bb81e340fa75958 (diff)
downloadopenttd-5f88e816416ee78b3b693253c0ff298c36459a8b.tar.xz
(svn r7642) -Codechange: unify all the different locations where the animation state is stored into a single location.
Diffstat (limited to 'industry_map.h')
-rw-r--r--industry_map.h41
1 files changed, 2 insertions, 39 deletions
diff --git a/industry_map.h b/industry_map.h
index b55ecd749..5a3512fd3 100644
--- a/industry_map.h
+++ b/industry_map.h
@@ -241,24 +241,7 @@ static inline void SetIndustryAnimationLoop(TileIndex tile, byte count)
static inline byte GetIndustryAnimationState(TileIndex tile)
{
assert(IsTileType(tile, MP_INDUSTRY));
- switch (GetIndustryGfx(tile)) {
- case GFX_POWERPLANT_SPARKS:
- return GB(_m[tile].m1, 2, 5);
- break;
-
- case GFX_OILWELL_ANIMATED_1:
- case GFX_OILWELL_ANIMATED_2:
- case GFX_OILWELL_ANIMATED_3:
- return GB(_m[tile].m1, 0, 2);
-
- case GFX_COAL_MINE_TOWER_ANIMATED:
- case GFX_COPPER_MINE_TOWER_ANIMATED:
- case GFX_GOLD_MINE_TOWER_ANIMATED:
- return _m[tile].m1;
-
- default:
- return _m[tile].m3;
- }
+ return _m[tile].m3;
}
/**
@@ -270,27 +253,7 @@ static inline byte GetIndustryAnimationState(TileIndex tile)
static inline void SetIndustryAnimationState(TileIndex tile, byte state)
{
assert(IsTileType(tile, MP_INDUSTRY));
- switch (GetIndustryGfx(tile)) {
- case GFX_POWERPLANT_SPARKS:
- SB(_m[tile].m1, 2, 5, state);
- break;
-
- case GFX_OILWELL_ANIMATED_1:
- case GFX_OILWELL_ANIMATED_2:
- case GFX_OILWELL_ANIMATED_3:
- SB(_m[tile].m1, 0, 2, state);
- break;
-
- case GFX_COAL_MINE_TOWER_ANIMATED:
- case GFX_COPPER_MINE_TOWER_ANIMATED:
- case GFX_GOLD_MINE_TOWER_ANIMATED:
- _m[tile].m1 = state;
- break;
-
- default:
- _m[tile].m3 = state;
- break;
- }
+ _m[tile].m3 = state;
}
#endif /* INDUSTRY_MAP_H */