summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-05 11:28:31 +0000
committertron <tron@openttd.org>2006-06-05 11:28:31 +0000
commit3c4a5d619258a45b66e149b9c9a5718f78ee0dcd (patch)
tree81d2954a32fa6ec6807b93b4e817106cb26ef99a
parentcb13a1e43d20bf376f5c360fad89dca4260fb196 (diff)
downloadopenttd-3c4a5d619258a45b66e149b9c9a5718f78ee0dcd.tar.xz
(svn r5121) Add forgotten file in r5120
-rw-r--r--ship.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ship.h b/ship.h
new file mode 100644
index 000000000..271ae7f08
--- /dev/null
+++ b/ship.h
@@ -0,0 +1,15 @@
+/* $Id$ */
+
+#include "vehicle.h"
+
+
+static inline bool IsShipInDepot(const Vehicle* v)
+{
+ assert(v->type == VEH_Ship);
+ return v->u.ship.state == 0x80;
+}
+
+static inline bool IsShipInDepotStopped(const Vehicle* v)
+{
+ return IsShipInDepot(v) && v->vehstatus & VS_STOPPED;
+}