mirror of https://github.com/OpenTTD/OpenTTD
(svn r19462) -Codechange: use the AS_GENERIC macro also for the dummy airport
parent
ba8f744941
commit
81ca0e28c4
|
@ -23,8 +23,6 @@ static AirportClass _airport_classes[APC_MAX];
|
||||||
|
|
||||||
AirportOverrideManager _airport_mngr(NEW_AIRPORT_OFFSET, NUM_AIRPORTS, AT_INVALID);
|
AirportOverrideManager _airport_mngr(NEW_AIRPORT_OFFSET, NUM_AIRPORTS, AT_INVALID);
|
||||||
|
|
||||||
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, STR_NULL, ATP_TTDP_LARGE, APC_BEGIN, false, {AT_INVALID, 0, NULL, NULL, AT_INVALID}};
|
|
||||||
|
|
||||||
AirportSpec AirportSpec::specs[NUM_AIRPORTS];
|
AirportSpec AirportSpec::specs[NUM_AIRPORTS];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -60,7 +60,6 @@ struct Airport : public TileArea {
|
||||||
|
|
||||||
const AirportFTAClass *GetFTA() const
|
const AirportFTAClass *GetFTA() const
|
||||||
{
|
{
|
||||||
if (this->tile == INVALID_TILE) return GetAirport(AT_DUMMY);
|
|
||||||
return this->GetSpec()->fsm;
|
return this->GetSpec()->fsm;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -406,6 +406,8 @@ extern const AirportSpec _origin_airport_specs[] = {
|
||||||
|
|
||||||
assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
|
assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
|
||||||
|
|
||||||
|
AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, NULL, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, false);
|
||||||
|
|
||||||
#undef AS
|
#undef AS
|
||||||
#undef AS_ND
|
#undef AS_ND
|
||||||
#undef AS_GENERIC
|
#undef AS_GENERIC
|
||||||
|
|
Loading…
Reference in New Issue