src/aircraft.h
changeset 7488 6f51ddf4c225
parent 7484 7734e4119e70
child 7490 bb27d92565d3
equal deleted inserted replaced
7487:0a3ff8c6ed75 7488:6f51ddf4c225
     5 #ifndef AIRCRAFT_H
     5 #ifndef AIRCRAFT_H
     6 #define AIRCRAFT_H
     6 #define AIRCRAFT_H
     7 
     7 
     8 #include "station_map.h"
     8 #include "station_map.h"
     9 #include "vehicle.h"
     9 #include "vehicle.h"
       
    10 #include "engine.h"
       
    11 #include "variables.h"
    10 
    12 
    11 /** An aircraft can be one ot those types */
    13 /** An aircraft can be one ot those types */
    12 enum AircraftSubType {
    14 enum AircraftSubType {
    13 	AIR_HELICOPTER = 0, ///< an helicopter
    15 	AIR_HELICOPTER = 0, ///< an helicopter
    14 	AIR_AIRCRAFT   = 2, ///< an airplane
    16 	AIR_AIRCRAFT   = 2, ///< an airplane
   128 	WindowClass GetVehicleListWindowClass() const { return WC_AIRCRAFT_LIST; }
   130 	WindowClass GetVehicleListWindowClass() const { return WC_AIRCRAFT_LIST; }
   129 	bool IsPrimaryVehicle() const { return IsNormalAircraft(this); }
   131 	bool IsPrimaryVehicle() const { return IsNormalAircraft(this); }
   130 	int GetImage(Direction direction) const;
   132 	int GetImage(Direction direction) const;
   131 	int GetDisplaySpeed() const { return this->cur_speed * 10 / 16; }
   133 	int GetDisplaySpeed() const { return this->cur_speed * 10 / 16; }
   132 	int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 16; }
   134 	int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 16; }
       
   135 	Money GetRunningCost() const { return AircraftVehInfo(this->engine_type)->running_cost * _price.aircraft_running; }
   133 	void Tick();
   136 	void Tick();
   134 };
   137 };
   135 
   138 
   136 #endif /* AIRCRAFT_H */
   139 #endif /* AIRCRAFT_H */