summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-04-14 01:54:07 +0000
committerbelugas <belugas@openttd.org>2006-04-14 01:54:07 +0000
commite84d878213e68263048befcaa8195344f683131f (patch)
tree666666f62052b4b05907ccbefd40e8b106d9bd85 /industry_cmd.c
parent8bff288817df4704461ee9c2f37969842c8e71ad (diff)
downloadopenttd-e84d878213e68263048befcaa8195344f683131f.tar.xz
(svn r4411) CodeChange : Define and use some Gfx for both stations and industries. More are still to come
Also, a bit of code cleaning, as pointed by Tron
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index e564ecbda..04a11f398 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -270,8 +270,8 @@ IndustryType GetIndustryType(TileIndex tile)
assert(IsTileType(tile, MP_INDUSTRY));
for (iloop = IT_COAL_MINE; iloop < IT_END; iloop += 1) {
- if IS_INT_INSIDE(this_type, industry_gfx_Solver[iloop].MinGfx,
- industry_gfx_Solver[iloop].MaxGfx) {
+ if (IS_BYTE_INSIDE(this_type, industry_gfx_Solver[iloop].MinGfx,
+ industry_gfx_Solver[iloop].MaxGfx)) {
return iloop;
}
}
@@ -531,7 +531,7 @@ static void AnimateTile_Industry(TileIndex tile)
byte m;
switch (GetIndustryGfx(tile)) {
- case 174:
+ case GFX_SUGAR_MINE_SIEVE:
if ((_tick_counter & 1) == 0) {
m = _m[tile].m3 + 1;
@@ -550,7 +550,7 @@ static void AnimateTile_Industry(TileIndex tile)
}
break;
- case 165:
+ case GFX_TOFFEE_QUARY:
if ((_tick_counter & 3) == 0) {
m = _m[tile].m3;
@@ -568,7 +568,7 @@ static void AnimateTile_Industry(TileIndex tile)
}
break;
- case 162:
+ case GFX_BUBBLE_CATCHER:
if ((_tick_counter&1) == 0) {
m = _m[tile].m3;
@@ -583,7 +583,7 @@ static void AnimateTile_Industry(TileIndex tile)
break;
// Sparks on a coal plant
- case 10:
+ case GFX_POWERPLANT_SPARKS:
if ((_tick_counter & 3) == 0) {
m = _m[tile].m1;
if (GB(m, 2, 5) == 6) {
@@ -596,7 +596,7 @@ static void AnimateTile_Industry(TileIndex tile)
}
break;
- case 143:
+ case GFX_TOY_FACTORY:
if ((_tick_counter & 1) == 0) {
m = _m[tile].m3 + 1;
@@ -733,9 +733,9 @@ static void MakeIndustryTileBigger(TileIndex tile)
if (GetIndustryGfx(tile + TileDiffXY(0, 1)) == 24) BuildOilRig(tile);
break;
- case 143:
- case 162:
- case 165:
+ case GFX_TOY_FACTORY:
+ case GFX_BUBBLE_CATCHER:
+ case GFX_TOFFEE_QUARY:
_m[tile].m3 = 0;
SetIndustryAnimationLoop(tile, 0);
break;