diff options
author | yexo <yexo@openttd.org> | 2009-06-21 13:26:30 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-06-21 13:26:30 +0000 |
commit | c7bd6c8d3460e6da19e38b230be7b456d31e1df8 (patch) | |
tree | a4878c0e6922e333990b3a767d74a83777883ba6 /src/airport.h | |
parent | 548a605263f7764602d6ee7fc9ca3856bf00918b (diff) | |
download | openttd-c7bd6c8d3460e6da19e38b230be7b456d31e1df8.tar.xz |
(svn r16614) -Codechange: Make the airport min/max available year a property of the Airport class.
-Change: rename station.always_small_airport to station.never_expire_airports to make it more future-proof
Diffstat (limited to 'src/airport.h')
-rw-r--r-- | src/airport.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/airport.h b/src/airport.h index e459187f8..0f1b49180 100644 --- a/src/airport.h +++ b/src/airport.h @@ -8,6 +8,7 @@ #include "direction_type.h" #include "map_type.h" #include "tile_type.h" +#include "date_type.h" /** Current limits for airports */ enum { @@ -151,7 +152,9 @@ struct AirportFTAClass { uint size_y, uint8 noise_level, byte delta_z, - byte catchment + byte catchment, + Year first_available, + Year last_available ); ~AirportFTAClass(); @@ -162,6 +165,9 @@ struct AirportFTAClass { return &moving_data[position]; } + /** Is this airport available at this date? */ + bool IsAvailable() const; + const AirportMovingData *moving_data; struct AirportFTA *layout; ///< state machine for airport const byte *terminals; @@ -176,6 +182,8 @@ struct AirportFTAClass { uint8 noise_level; ///< noise that this airport generates byte delta_z; ///< Z adjustment for helicopter pads byte catchment; + Year first_available; ///< the year this airport becomes available + Year last_available; ///< the year this airport expires }; DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags) @@ -194,13 +202,6 @@ void InitializeAirports(); void UnInitializeAirports(); const AirportFTAClass *GetAirport(const byte airport_type); -/** Get buildable airport bitmask. - * @return get all buildable airports at this given time, bitmasked. - * Bit 0 means the small airport is buildable, etc. - * @todo set availability of airports by year, instead of airplane - */ -uint32 GetValidAirports(); - extern const byte * const _airport_sections[]; #endif /* AIRPORT_H */ |