Mercurial > hg > openttd
changeset 3962:082bf707b9ef draft
(svn r5121) Add forgotten file in r5120
author | tron <tron@openttd.org> |
---|---|
date | Mon, 05 Jun 2006 11:28:31 +0000 |
parents | 4a3e1d2e1925 |
children | b8b3c73be0e9 |
files | ship.h |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /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; +}