ai_airport.hpp

Go to the documentation of this file.
00001 /* $Id: ai_airport.hpp 15520 2009-02-19 09:01:34Z yexo $ */
00002 
00005 #ifndef AI_AIRPORT_HPP
00006 #define AI_AIRPORT_HPP
00007 
00008 #include "ai_object.hpp"
00009 
00013 class AIAirport : public AIObject {
00014 public:
00015   static const char *GetClassName() { return "AIAirport"; }
00016 
00020   enum AirportType {
00021     /* Note: the values _are_ important as they represent an in-game value */
00022     AT_SMALL         =   0, 
00023     AT_LARGE         =   1, 
00024     AT_METROPOLITAN  =   3, 
00025     AT_INTERNATIONAL =   4, 
00026     AT_COMMUTER      =   5, 
00027     AT_INTERCON      =   7, 
00028 
00029     /* Next are the airports which only have helicopter platforms */
00030     AT_HELIPORT      =   2, 
00031     AT_HELISTATION   =   8, 
00032     AT_HELIDEPOT     =   6, 
00033 
00034     AT_INVALID       = 255, 
00035   };
00036 
00040   enum PlaneType {
00041     /* Note: the values _are_ important as they represent an in-game value */
00042     PT_HELICOPTER    =   0, 
00043     PT_SMALL_PLANE   =   1, 
00044     PT_BIG_PLANE     =   3, 
00045 
00046     PT_INVALID       =  -1, 
00047   };
00048 
00054   static bool IsValidAirportType(AirportType type);
00055 
00062   static bool IsHangarTile(TileIndex tile);
00063 
00070   static bool IsAirportTile(TileIndex tile);
00071 
00077   static int32 GetAirportWidth(AirportType type);
00078 
00084   static int32 GetAirportHeight(AirportType type);
00085 
00091   static int32 GetAirportCoverageRadius(AirportType type);
00092 
00099   static int32 GetNumHangars(TileIndex tile);
00100 
00111   static TileIndex GetHangarOfAirport(TileIndex tile);
00112 
00128   static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
00129 
00137   static bool RemoveAirport(TileIndex tile);
00138 
00146   static AirportType GetAirportType(TileIndex tile);
00147 
00156   static int GetNoiseLevelIncrease(TileIndex tile, AirportType type);
00157 
00165   static TownID GetNearestTown(TileIndex tile, AirportType type);
00166 };
00167 
00168 #endif /* AI_AIRPORT_HPP */

Generated on Sun Mar 15 22:49:44 2009 for openttd by  doxygen 1.5.6