summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-05-14 12:36:16 +0000
committerDarkvater <Darkvater@openttd.org>2005-05-14 12:36:16 +0000
commit7470322a3d0fd1d37ab95ba4625e3bed2ad22f84 (patch)
tree1e61fee7bb3cc51b1847fb0b48b1f3cec7699f5a /newgrf.c
parent5c8d40bb05a47f9df56296aa3e81f4f70189aeb6 (diff)
downloadopenttd-7470322a3d0fd1d37ab95ba4625e3bed2ad22f84.tar.xz
(svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks"
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/newgrf.c b/newgrf.c
index 30c5a8f06..3607326aa 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -1450,8 +1450,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
return;
}
- if (ctype == 0xFF)
- ctype = CID_PURCHASE;
+ if (ctype == GC_INVALID) ctype = GC_PURCHASE;
if (wagover) {
// TODO: No multiple cargo types per vehicle yet. --pasky
@@ -1482,7 +1481,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
// TODO: No multiple cargo types per vehicle yet. --pasky
SetWagonOverrideSprites(engine, &_cur_grffile->spritegroups[groupid], last_engines, last_engines_count);
} else {
- SetCustomEngineSprites(engine, CID_DEFAULT, &_cur_grffile->spritegroups[groupid]);
+ SetCustomEngineSprites(engine, GC_DEFAULT, &_cur_grffile->spritegroups[groupid]);
last_engines[i] = engine;
}
}