mirror of https://github.com/OpenTTD/OpenTTD
(svn r19456) -Codechange; increase the maximum number of airports
parent
c4a88ce022
commit
a99a7e7a37
|
@ -37,7 +37,8 @@ enum {
|
||||||
AT_INTERCON = 7,
|
AT_INTERCON = 7,
|
||||||
AT_HELISTATION = 8,
|
AT_HELISTATION = 8,
|
||||||
AT_OILRIG = 9,
|
AT_OILRIG = 9,
|
||||||
NUM_AIRPORTS = 10,
|
NEW_AIRPORT_OFFSET = 10,
|
||||||
|
NUM_AIRPORTS = 128,
|
||||||
AT_DUMMY = 255
|
AT_DUMMY = 255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ void AirportSpec::ResetAirports()
|
||||||
{
|
{
|
||||||
extern const AirportSpec _origin_airport_specs[];
|
extern const AirportSpec _origin_airport_specs[];
|
||||||
memset(&AirportSpec::specs, 0, sizeof(AirportSpec::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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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),
|
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
|
||||||
#undef AS_ND
|
#undef AS_ND
|
||||||
|
|
Loading…
Reference in New Issue