summaryrefslogtreecommitdiff
path: root/engine.h
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-11-12 17:16:13 +0000
committerdarkvater <darkvater@openttd.org>2004-11-12 17:16:13 +0000
commite7441c39e32500b99b15cc51838e77f06a797db5 (patch)
tree7fdff3a03c500414392baff12749254cb80782d6 /engine.h
parentacaff32984e0a678055811c5c9f0c7ae9cf6d958 (diff)
downloadopenttd-e7441c39e32500b99b15cc51838e77f06a797db5.tar.xz
(svn r546) -newgrf: Use GetCustomVehicleIcon() for fetching sprites for vehicle selection dialogs. (Idea by octo, done by pasky).
Diffstat (limited to 'engine.h')
-rw-r--r--engine.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine.h b/engine.h
index 016b206e7..4dc64a817 100644
--- a/engine.h
+++ b/engine.h
@@ -91,7 +91,9 @@ int GetCustomEngineSprite(byte engine, uint16 overriding_engine, byte cargo, byt
GetCustomEngineSprite(v->engine_type, v->type == VEH_Train ? v->u.rail.first_engine : -1, \
_global_cargo_id[_opt.landscape][v->cargo_type], \
((v->cargo_count + 1) * 100) / (v->cargo_cap + 1), \
- !!v->cur_speed, direction);
+ !!v->cur_speed, direction)
+#define GetCustomVehicleIcon(v, direction) \
+ GetCustomEngineSprite(v, -1, CID_PURCHASE, 0, 0, direction)
void SetCustomEngineName(int engine, char *name);
StringID GetCustomEngineName(int engine);