summaryrefslogtreecommitdiff
path: root/airport.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-20 15:13:27 +0000
committertron <tron@openttd.org>2006-05-20 15:13:27 +0000
commitedb5e87e0c1dc116e5281ac775b2ca17e67654d3 (patch)
treeed501eeb08a1ccb519796aec762515649521aa43 /airport.c
parent910aa90bd366d10df423f1d591b6bebb8a972256 (diff)
downloadopenttd-edb5e87e0c1dc116e5281ac775b2ca17e67654d3.tar.xz
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
Diffstat (limited to 'airport.c')
-rw-r--r--airport.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/airport.c b/airport.c
index 42401f676..1fb1369ef 100644
--- a/airport.c
+++ b/airport.c
@@ -20,7 +20,9 @@ static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
const byte *terminals, const byte *helipads,
const byte entry_point, const byte acc_planes,
const AirportFTAbuildup *FA,
- const TileIndexDiffC *depots, const byte nof_depots);
+ const TileIndexDiffC *depots, const byte nof_depots,
+ uint size_x, uint size_y
+);
static void AirportFTAClass_Destructor(AirportFTAClass *Airport);
static uint16 AirportGetNofElements(const AirportFTAbuildup *FA);
@@ -42,7 +44,8 @@ void InitializeAirports(void)
ALL,
_airport_fta_country,
_airport_depots_country,
- lengthof(_airport_depots_country)
+ lengthof(_airport_depots_country),
+ 4, 3
);
// city airport
@@ -56,7 +59,8 @@ void InitializeAirports(void)
ALL,
_airport_fta_city,
_airport_depots_city,
- lengthof(_airport_depots_city)
+ lengthof(_airport_depots_city),
+ 6, 6
);
// metropolitan airport
@@ -70,7 +74,8 @@ void InitializeAirports(void)
ALL,
_airport_fta_metropolitan,
_airport_depots_metropolitan,
- lengthof(_airport_depots_metropolitan)
+ lengthof(_airport_depots_metropolitan),
+ 6, 6
);
// international airport
@@ -84,7 +89,8 @@ void InitializeAirports(void)
ALL,
_airport_fta_international,
_airport_depots_international,
- lengthof(_airport_depots_international)
+ lengthof(_airport_depots_international),
+ 7, 7
);
// heliport, oilrig
@@ -98,7 +104,8 @@ void InitializeAirports(void)
HELICOPTERS_ONLY,
_airport_fta_heliport_oilrig,
NULL,
- 0
+ 0,
+ 1, 1
);
Oilrig = Heliport; // exactly the same structure for heliport/oilrig, so share state machine
@@ -117,7 +124,9 @@ static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
const byte *terminals, const byte *helipads,
const byte entry_point, const byte acc_planes,
const AirportFTAbuildup *FA,
- const TileIndexDiffC *depots, const byte nof_depots)
+ const TileIndexDiffC *depots, const byte nof_depots,
+ uint size_x, uint size_y
+)
{
byte nofterminals, nofhelipads;
byte nofterminalgroups = 0;
@@ -126,6 +135,9 @@ static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
int i;
nofterminals = nofhelipads = 0;
+ Airport->size_x = size_x;
+ Airport->size_y = size_y;
+
//now we read the number of terminals we have
if (terminals != NULL) {
i = terminals[0];