Changeset - r14850:537311950e1a
[Not reviewed]
master
0 3 0
yexo - 14 years ago 2010-03-18 23:10:35
yexo@openttd.org
(svn r19456) -Codechange; increase the maximum number of airports
3 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/airport.h
Show inline comments
 
@@ -34,13 +34,14 @@ enum {
 
	AT_INTERNATIONAL =   4,
 
	AT_COMMUTER      =   5,
 
	AT_HELIDEPOT     =   6,
 
	AT_INTERCON      =   7,
 
	AT_HELISTATION   =   8,
 
	AT_OILRIG        =   9,
 
	NUM_AIRPORTS     =  10,
 
	NEW_AIRPORT_OFFSET = 10,
 
	NUM_AIRPORTS     =  128,
 
	AT_DUMMY         = 255
 
};
 

	
 
enum {
 
	AMED_NOSPDCLAMP = 1 << 0,
 
	AMED_TAKEOFF    = 1 << 1,
src/newgrf_airport.cpp
Show inline comments
 
@@ -60,13 +60,13 @@ bool AirportSpec::IsAvailable() const
 
 * This function initialize the airportspec array.
 
 */
 
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);
 
}
 

	
 
/**
 
 * Allocate an airport class for the given class id
 
 * @param cls A 32 bit value identifying the class
 
 * @return Index into _airport_classes of allocated class
src/table/airport_defaults.h
Show inline comments
 
@@ -401,13 +401,13 @@ extern const AirportSpec _origin_airport
 
	AS(helidepot, 2, 2, 1976, MAX_YEAR, 4, 2, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELIDEPOT),
 
	AS(intercontinental, 9, 11, 2002, MAX_YEAR, 10, 25, ATP_TTDP_LARGE, APC_HUB, STR_AIRPORT_INTERCONTINENTAL),
 
	AS(helistation, 4, 2, 1980, MAX_YEAR, 4, 3, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELISTATION),
 
	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
 
#undef AS_GENERIC
 

	
 
#endif /* AIRPORT_DEFAULTS_H */
0 comments (0 inline, 0 general)