src/airport.h
changeset 9334 28ac6c8e0795
parent 8895 e4ecbcab7d0e
child 9669 da2ecea5561e
equal deleted inserted replaced
9333:2da01b3b71d8 9334:28ac6c8e0795
     5 #ifndef AIRPORT_H
     5 #ifndef AIRPORT_H
     6 #define AIRPORT_H
     6 #define AIRPORT_H
     7 
     7 
     8 #include "direction_type.h"
     8 #include "direction_type.h"
     9 #include "map_type.h"
     9 #include "map_type.h"
       
    10 #include "tile_type.h"
    10 
    11 
    11 enum {MAX_TERMINALS =  10};
    12 enum {MAX_TERMINALS =  10};
    12 enum {MAX_HELIPADS  =   4};
    13 enum {MAX_HELIPADS  =   4};
    13 enum {MAX_ELEMENTS  = 255};
    14 enum {MAX_ELEMENTS  = 255};
    14 enum {MAX_HEADINGS  =  22};
    15 enum {MAX_HEADINGS  =  22};
   142 			const AirportFTAbuildup *apFA,
   143 			const AirportFTAbuildup *apFA,
   143 			const TileIndexDiffC *depots,
   144 			const TileIndexDiffC *depots,
   144 			byte nof_depots,
   145 			byte nof_depots,
   145 			uint size_x,
   146 			uint size_x,
   146 			uint size_y,
   147 			uint size_y,
       
   148 			uint8 noise_level,
   147 			byte delta_z,
   149 			byte delta_z,
   148 			byte catchment
   150 			byte catchment
   149 		);
   151 		);
   150 
   152 
   151 		~AirportFTAClass();
   153 		~AirportFTAClass();
   165 	byte nof_depots;                      ///< number of depots this airport has
   167 	byte nof_depots;                      ///< number of depots this airport has
   166 	byte nofelements;                     ///< number of positions the airport consists of
   168 	byte nofelements;                     ///< number of positions the airport consists of
   167 	const byte *entry_points;             ///< when an airplane arrives at this airport, enter it at position entry_point, index depends on direction
   169 	const byte *entry_points;             ///< when an airplane arrives at this airport, enter it at position entry_point, index depends on direction
   168 	byte size_x;
   170 	byte size_x;
   169 	byte size_y;
   171 	byte size_y;
       
   172 	uint8 noise_level;                    ///< noise that this airport generates
   170 	byte delta_z;                         ///< Z adjustment for helicopter pads
   173 	byte delta_z;                         ///< Z adjustment for helicopter pads
   171 	byte catchment;
   174 	byte catchment;
   172 };
   175 };
   173 
   176 
   174 DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags)
   177 DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags)
   192  * Bit 0 means the small airport is buildable, etc.
   195  * Bit 0 means the small airport is buildable, etc.
   193  * @todo set availability of airports by year, instead of airplane
   196  * @todo set availability of airports by year, instead of airplane
   194  */
   197  */
   195 uint32 GetValidAirports();
   198 uint32 GetValidAirports();
   196 
   199 
       
   200 
       
   201 /* Calculate the noise this type airport will generate */
       
   202 uint8 GetAirportNoiseLevelForTown(const AirportFTAClass *afc, TileIndex town_tile, TileIndex tile);
       
   203 
   197 #endif /* AIRPORT_H */
   204 #endif /* AIRPORT_H */