airport.h
changeset 2159 f6284cf5fab0
parent 2153 ecfc674410b4
child 2186 db48cf29b983
equal deleted inserted replaced
2158:722042326977 2159:f6284cf5fab0
     1 #ifndef AIRPORT_H
     1 #ifndef AIRPORT_H
     2 #define AIRPORT_H
     2 #define AIRPORT_H
     3 
     3 
     4 #include "airport_movement.h"
     4 #include "airport_movement.h"
     5 #include "variables.h"
       
     6 
     5 
     7 enum {MAX_TERMINALS = 6};
     6 enum {MAX_TERMINALS = 6};
     8 enum {MAX_HELIPADS  = 2};
     7 enum {MAX_HELIPADS  = 2};
     9 
     8 
    10 // Airport types
     9 // Airport types
    52 /** Get buildable airport bitmask.
    51 /** Get buildable airport bitmask.
    53  * @return get all buildable airports at this given time, bitmasked.
    52  * @return get all buildable airports at this given time, bitmasked.
    54  * Bit 0 means the small airport is buildable, etc.
    53  * Bit 0 means the small airport is buildable, etc.
    55  * @todo set availability of airports by year, instead of airplane
    54  * @todo set availability of airports by year, instead of airplane
    56  */
    55  */
    57 static inline uint32 GetValidAirports(void)
    56 uint32 GetValidAirports(void);
    58 {
       
    59 	uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft()
       
    60 
       
    61 	// 1980-1-1 is --> 21915
       
    62 	// 1990-1-1 is --> 25568
       
    63 	if (_date >= 21915) {SETBIT(bytemask, 3);}	// metropilitan airport 1980
       
    64 	if (_date >= 25568) {SETBIT(bytemask, 4);}	// international airport 1990
       
    65 	return bytemask;
       
    66 }
       
    67 
    57 
    68 #endif /* AIRPORT_H */
    58 #endif /* AIRPORT_H */