summaryrefslogtreecommitdiff
path: root/src/ship.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
committerrubidium <rubidium@openttd.org>2007-08-29 21:49:08 +0000
commita407d53d1b2a329a5ae747ea83d4652427cc6c8a (patch)
treeeb86df4a79dffa6270deda722c234ab9cb3c8964 /src/ship.h
parenta28d33b5dc89e47ae271b5dbdcc4f5e6f1784c6c (diff)
downloadopenttd-a407d53d1b2a329a5ae747ea83d4652427cc6c8a.tar.xz
(svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot.
Diffstat (limited to 'src/ship.h')
-rw-r--r--src/ship.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ship.h b/src/ship.h
index 929eeccc6..b08bc18f4 100644
--- a/src/ship.h
+++ b/src/ship.h
@@ -13,18 +13,6 @@ void CcBuildShip(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;
-}
-
-
/**
* This class 'wraps' Vehicle; you do not actually instantiate this class.
* You create a Vehicle using AllocateVehicle, so it is added to the pool
@@ -51,6 +39,7 @@ struct Ship: public Vehicle {
int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; }
Money GetRunningCost() const { return ShipVehInfo(this->engine_type)->running_cost * _price.ship_running; }
+ bool IsInDepot() const { return this->u.ship.state == 0x80; }
void Tick();
};