src/ship.h
changeset 7984 c539c9368e3c
parent 7980 9b12784cc39c
child 7986 881998b115c2
equal deleted inserted replaced
7983:06d272a9618b 7984:c539c9368e3c
     4 
     4 
     5 #ifndef SHIP_H
     5 #ifndef SHIP_H
     6 #define SHIP_H
     6 #define SHIP_H
     7 
     7 
     8 #include "vehicle.h"
     8 #include "vehicle.h"
       
     9 #include "engine.h"
       
    10 #include "variables.h"
     9 
    11 
    10 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2);
    12 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2);
    11 void RecalcShipStuff(Vehicle *v);
    13 void RecalcShipStuff(Vehicle *v);
    12 void GetShipSpriteSize(EngineID engine, uint &width, uint &height);
    14 void GetShipSpriteSize(EngineID engine, uint &width, uint &height);
    13 
    15 
    46 	void PlayLeaveStationSound() const;
    48 	void PlayLeaveStationSound() const;
    47 	bool IsPrimaryVehicle() const { return true; }
    49 	bool IsPrimaryVehicle() const { return true; }
    48 	int GetImage(Direction direction) const;
    50 	int GetImage(Direction direction) const;
    49 	int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
    51 	int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
    50 	int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; }
    52 	int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; }
       
    53 	Money GetRunningCost() const { return ShipVehInfo(this->engine_type)->running_cost * _price.ship_running; }
    51 	void Tick();
    54 	void Tick();
    52 };
    55 };
    53 
    56 
    54 #endif /* SHIP_H */
    57 #endif /* SHIP_H */