summaryrefslogtreecommitdiff
path: root/airport.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-01 11:27:39 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-01 11:27:39 +0000
commitd1fa0742a5cf4b25ef35a312ddf8918c015e9ce5 (patch)
treef9b79e6bc23b89c636bd561a097b8f9bc78d971c /airport.c
parent80a75e35738c505727fc546868fb34db3cc52a56 (diff)
downloadopenttd-d1fa0742a5cf4b25ef35a312ddf8918c015e9ce5.tar.xz
(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.
Diffstat (limited to 'airport.c')
-rw-r--r--airport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/airport.c b/airport.c
index a3fbf3af9..42401f676 100644
--- a/airport.c
+++ b/airport.c
@@ -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()