view src/ship.h @ 6173:214cf8e79e71 draft

(svn r8943) -Fix (r5338): [NewGRF] Fix support for vehicle variable 48, which just returns Engine[id].flags
author maedhros <maedhros@openttd.org>
date Wed, 28 Feb 2007 10:40:34 +0000
parents 6ece78140826
children 4a39d6291d58
line wrap: on
line source

/* $Id$ */

#ifndef SHIP_H
#define SHIP_H

#include "vehicle.h"

void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2);
void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2);
void RecalcShipStuff(Vehicle *v);
void GetShipSpriteSize(EngineID engine, uint &width, uint &height);

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;
}

#endif /* SHIP_H */