summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-18 23:10:35 +0000
committeryexo <yexo@openttd.org>2010-03-18 23:10:35 +0000
commita99a7e7a3784ce6678f8ce2402473133efe511e5 (patch)
tree4442c8e34282b6606c87df7ff67dc544b2407d4e
parentc4a88ce0225a57243a79e28d133c2ecd884bee68 (diff)
downloadopenttd-a99a7e7a3784ce6678f8ce2402473133efe511e5.tar.xz
(svn r19456) -Codechange; increase the maximum number of airports
-rw-r--r--src/airport.h3
-rw-r--r--src/newgrf_airport.cpp2
-rw-r--r--src/table/airport_defaults.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/airport.h b/src/airport.h
index 2ab2e2c5f..d1cddba15 100644
--- a/src/airport.h
+++ b/src/airport.h
@@ -37,7 +37,8 @@ enum {
AT_INTERCON = 7,
AT_HELISTATION = 8,
AT_OILRIG = 9,
- NUM_AIRPORTS = 10,
+ NEW_AIRPORT_OFFSET = 10,
+ NUM_AIRPORTS = 128,
AT_DUMMY = 255
};
diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp
index 689b5204a..aaac23c52 100644
--- a/src/newgrf_airport.cpp
+++ b/src/newgrf_airport.cpp
@@ -63,7 +63,7 @@ void AirportSpec::ResetAirports()
{
extern const AirportSpec _origin_airport_specs[];
memset(&AirportSpec::specs, 0, sizeof(AirportSpec::specs));
- memcpy(&AirportSpec::specs, &_origin_airport_specs, sizeof(AirportSpec) * NUM_AIRPORTS);
+ memcpy(&AirportSpec::specs, &_origin_airport_specs, sizeof(AirportSpec) * NEW_AIRPORT_OFFSET);
}
/**
diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h
index cd9f195b3..0ff8ea2c2 100644
--- a/src/table/airport_defaults.h
+++ b/src/table/airport_defaults.h
@@ -404,7 +404,7 @@ extern const AirportSpec _origin_airport_specs[] = {
AS_GENERIC(&_airportfta_oilrig, NULL, 0, NULL, 0, 1, 1, 0, 4, 0, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, false),
};
-assert_compile(NUM_AIRPORTS == lengthof(_origin_airport_specs));
+assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
#undef AS
#undef AS_ND