summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-06-06 00:19:24 +0000
committerhackykid <hackykid@openttd.org>2005-06-06 00:19:24 +0000
commit1018d3b78670be09d0d6ffbb2633b715c0203146 (patch)
tree953354be89e9773360834c65363da6c96c051d79 /engine.c
parent09aadafda1dfb08780fade5a52289a0742f84674 (diff)
downloadopenttd-1018d3b78670be09d0d6ffbb2633b715c0203146.tar.xz
(svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it.
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/engine.c b/engine.c
index 0265f2116..a055acf60 100644
--- a/engine.c
+++ b/engine.c
@@ -589,6 +589,16 @@ int GetCustomEngineSprite(byte engine, const Vehicle *v, byte direction)
}
/**
+ * Check if a wagon is currently using a wagon override
+ * @param v The wagon to check
+ * @return true if it is using an override, false otherwise
+ */
+bool UsesWagonOverride(const Vehicle *v) {
+ assert(v->type == VEH_Train);
+ return (GetWagonOverrideSpriteSet(v->engine_type, v->u.rail.first_engine) != NULL);
+}
+
+/**
* Evaluates a newgrf callback
* @param callback_info info about which callback to evaluate
* (bit 0-7) = CallBack id of the callback to use, see CallBackId enum