src/airport.cpp
changeset 6222 50e47f803549
parent 6189 2b1ae5e373e9
child 6254 abc6ad7c035c
child 6346 4aad704385e1
equal deleted inserted replaced
6221:8c3234f2fd57 6222:50e47f803549
   445 }
   445 }
   446 
   446 
   447 
   447 
   448 uint32 GetValidAirports(void)
   448 uint32 GetValidAirports(void)
   449 {
   449 {
   450 	uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft()
   450 	uint32 mask = 0;
   451 
   451 
   452 	if (_cur_year >= 1980) SETBIT(bytemask, 3); // metropolitan airport
   452 	if (_cur_year <  1960 || _patches.always_small_airport) SETBIT(mask, 0);  // small airport
   453 	if (_cur_year >= 1990) SETBIT(bytemask, 4); // international airport
   453 	if (_cur_year >= 1955) SETBIT(mask, 1); // city airport
   454 	if (_cur_year >= 1983) SETBIT(bytemask, 5); // commuter airport
   454 	if (_cur_year >= 1963) SETBIT(mask, 2); // heliport
   455 	if (_cur_year >= 1976) SETBIT(bytemask, 6); // helidepot
   455 	if (_cur_year >= 1980) SETBIT(mask, 3); // metropolitan airport
   456 	if (_cur_year >= 2002) SETBIT(bytemask, 7); // intercontinental airport
   456 	if (_cur_year >= 1990) SETBIT(mask, 4); // international airport
   457 	if (_cur_year >= 1980) SETBIT(bytemask, 8); // helistation
   457 	if (_cur_year >= 1983) SETBIT(mask, 5); // commuter airport
   458 	return bytemask;
   458 	if (_cur_year >= 1976) SETBIT(mask, 6); // helidepot
   459 }
   459 	if (_cur_year >= 2002) SETBIT(mask, 7); // intercontinental airport
       
   460 	if (_cur_year >= 1980) SETBIT(mask, 8); // helistation
       
   461 	return mask;
       
   462 }