src/ship.h
author belugas
Tue, 03 Apr 2007 00:13:59 +0000
changeset 6414 3eaf5e612aa4
parent 6259 471b91a4b1d8
child 6420 456c275f3313
permissions -rw-r--r--
(svn r9550) -Codechange: Add notion and data of industry appearing chances, both in game and in creation mode.
Not used yet.
/* $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 */