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
commit6d135c110002729acd0800fa4ffe6750a3132f27 (patch)
tree81d2954a32fa6ec6807b93b4e817106cb26ef99a
parentce9639c6bc8dd1b6a704ad2d4a9301c57a5d67db (diff)
downloadopenttd-6d135c110002729acd0800fa4ffe6750a3132f27.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;
+}