(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.

This commit is contained in:
peter1138
2006-05-01 11:27:39 +00:00
parent 80a75e3573
commit d1fa0742a5
5 changed files with 83 additions and 81 deletions

View File

@@ -7,6 +7,7 @@
#include "airport.h"
#include "macros.h"
#include "variables.h"
#include "airport_movement.h"
static AirportFTAClass* CountryAirport;
static AirportFTAClass* CityAirport;
@@ -371,6 +372,13 @@ const AirportFTAClass* GetAirport(const byte airport_type)
return Airport;
}
const AirportMovingData *GetAirportMovingData(byte airport_type, byte position)
{
assert(airport_type < lengthof(_airport_moving_datas));
assert(position < GetAirport(airport_type)->nofelements);
return &_airport_moving_datas[airport_type][position];
}
uint32 GetValidAirports(void)
{
uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft()