File diff r2158:c6fcd114db94 → r2159:2c706fe6b0a7
airport.c
Show inline comments
 
@@ -3,6 +3,8 @@
 
#include "debug.h"
 
#include "map.h"
 
#include "airport.h"
 
#include "macros.h"
 
#include "variables.h"
 

	
 
AirportFTAClass *CountryAirport;
 
AirportFTAClass *CityAirport;
 
@@ -359,3 +361,14 @@ const AirportFTAClass* GetAirport(const 
 
	}
 
	return Airport;
 
}
 

	
 
uint32 GetValidAirports(void)
 
{
 
	uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft()
 

	
 
	// 1980-1-1 is --> 21915
 
	// 1990-1-1 is --> 25568
 
	if (_date >= 21915) {SETBIT(bytemask, 3);}	// metropilitan airport 1980
 
	if (_date >= 25568) {SETBIT(bytemask, 4);}	// international airport 1990
 
	return bytemask;
 
}