src/airport.cpp
author richk
Tue, 17 Jun 2008 13:41:57 +0000
branchNewGRF_ports
changeset 10995 311b38c7f9a7
parent 10724 68a692eacf22
permissions -rw-r--r--
(svn r13549) [NewGRF_ports] -Change: Make recolouring of groundtile (0x0f80) specific to NewGRF_ports only.
Also base groundsprite on airport_tile of station. This prevents mixed colour groundtiles in an airport.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2159
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2159
diff changeset
     2
10724
68a692eacf22 (svn r13274) [NewGRF_ports] -Sync: with trunk r12806:13144.
richk
parents: 6872
diff changeset
     3
/** @file airport.cpp Functions related to airports. */
6443
b8f06d8eb7be (svn r8853) -Cleanup: doxygen changes. Correct forgotten c files to cpp files with the @file tag as well as a few general comments style
belugas
parents: 6413
diff changeset
     4
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     5
#include "stdafx.h"
1891
92a3b0aa0946 (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents: 1299
diff changeset
     6
#include "openttd.h"
1299
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents: 1093
diff changeset
     7
#include "debug.h"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     8
#include "airport.h"
6872
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
     9
#include "core/bitmath_func.hpp"
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
    10
#include "core/alloc_func.hpp"
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
    11
#include "date_func.h"
1c4a4a609f85 (svn r11950) [NewGRF_ports] -Sync with trunk r11566:11949.
rubidium
parents: 6871
diff changeset
    12
#include "settings_type.h"
6818
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
    13
#include "newgrf_fsmports.h"
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    14
6854
92ca286e9466 (svn r10957) [NewGRF_ports] -Codechange: reduce the dependency on AT_XXX enums and airport_type.
rubidium
parents: 6853
diff changeset
    15
/* static */ AirportFTAClass *AirportFTAClass::oil_rig; ///< "Special" holding pattern used for oil rigs.
92ca286e9466 (svn r10957) [NewGRF_ports] -Codechange: reduce the dependency on AT_XXX enums and airport_type.
rubidium
parents: 6853
diff changeset
    16
/* static */ AirportFTAClass *AirportFTAClass::dummy;   ///< A dummy holding pattern to be used when an airport has been removed, but the order to go to the airport has not been removed.
92ca286e9466 (svn r10957) [NewGRF_ports] -Codechange: reduce the dependency on AT_XXX enums and airport_type.
rubidium
parents: 6853
diff changeset
    17
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    18
/* Uncomment this to print out a full report of the airport-structure
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    19
 * You should either use
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    20
 * - true: full-report, print out every state and choice with string-names
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    21
 * OR
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    22
 * - false: give a summarized report which only shows current and next position */
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    23
//#define DEBUG_AIRPORT false
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    24
6856
0e8e4ebf23ff (svn r10959) [NewGRF_ports] -Change: Rename FSMState to FSMCommand. nof_elements changed to num_positions. nof_depots changed to num_depots.
richk
parents: 6854
diff changeset
    25
static byte AirportTestFTA(uint num_positions, const AirportFTA *layout, const byte *terminals);
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    26
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    27
#ifdef DEBUG_AIRPORT
6853
b3b8bb6c0a48 (svn r10956) [NewGRF_ports] -Codechange: start refactoring the airport specific code to be more generic so it can be used for non-aircraft ports too.
rubidium
parents: 6837
diff changeset
    28
static void AirportPrintOut(uint nof_elements, const AirportFTA *layout, bool full_report);
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    29
#endif
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    30
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    31
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    32
AirportFTAClass::~AirportFTAClass()
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    33
{
6856
0e8e4ebf23ff (svn r10959) [NewGRF_ports] -Change: Rename FSMState to FSMCommand. nof_elements changed to num_positions. nof_depots changed to num_depots.
richk
parents: 6854
diff changeset
    34
	for (uint i = 0; i < num_positions; i++) {
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    35
		AirportFTA *current = layout[i].next;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    36
		while (current != NULL) {
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    37
			AirportFTA *next = current->next;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
			free(current);
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    39
			current = next;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    40
		};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
	}
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    42
	free(layout);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    43
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    44
6856
0e8e4ebf23ff (svn r10959) [NewGRF_ports] -Change: Rename FSMState to FSMCommand. nof_elements changed to num_positions. nof_depots changed to num_depots.
richk
parents: 6854
diff changeset
    45
static byte AirportTestFTA(uint num_positions, const AirportFTA *layout, const byte *terminals)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    46
{
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    47
	uint next_position = 0;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    48
6856
0e8e4ebf23ff (svn r10959) [NewGRF_ports] -Change: Rename FSMState to FSMCommand. nof_elements changed to num_positions. nof_depots changed to num_depots.
richk
parents: 6854
diff changeset
    49
	for (uint i = 0; i < num_positions; i++) {
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    50
		uint position = layout[i].position;
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    51
		if (position != next_position) return i;
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    52
		const AirportFTA *first = &layout[i];
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    53
6413
3d660a812fbd (svn r8822) -Fix
tron
parents: 6367
diff changeset
    54
		for (const AirportFTA *current = first; current != NULL; current = current->next) {
4844
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    55
			/* A heading must always be valid. The only exceptions are
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    56
			 * - multiple choices as start, identified by a special value of 255
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    57
			 * - terminal group which is identified by a special value of 255 */
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    58
			if (current->heading > MAX_HEADINGS) {
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    59
				if (current->heading != 255) return i;
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    60
				if (current == first && current->next == NULL) return i;
6183
5d864a25ae2b (svn r8570) -Fix
tron
parents: 6175
diff changeset
    61
				if (current != first && current->next_position > terminals[0]) return i;
4844
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    62
			}
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    63
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    64
			/* If there is only one choice, it must be at the end */
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    65
			if (current->heading == 0 && current->next != NULL) return i;
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    66
			/* Obviously the elements of the linked list must have the same identifier */
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    67
			if (position != current->position) return i;
4844
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    68
			/* A next position must be within bounds */
6856
0e8e4ebf23ff (svn r10959) [NewGRF_ports] -Change: Rename FSMState to FSMCommand. nof_elements changed to num_positions. nof_depots changed to num_depots.
richk
parents: 6854
diff changeset
    69
			if (current->next_position >= num_positions) return i;
4844
15faacbff622 (svn r6770) -Codechange: Make the airport checking a bit stricter...fix unnoticed errors:
Darkvater
parents: 4843
diff changeset
    70
		}
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    71
		next_position++;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    72
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    73
	return MAX_ELEMENTS;
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    74
}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    75
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
    76
#ifdef DEBUG_AIRPORT
2549
f1d3b383d557 (svn r3078) Some more stuff, which piled up:
tron
parents: 2186
diff changeset
    77
static const char* const _airport_heading_strings[] = {
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    78
	"TO_ALL",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    79
	"HANGAR",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    80
	"TERM1",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    81
	"TERM2",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    82
	"TERM3",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    83
	"TERM4",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    84
	"TERM5",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    85
	"TERM6",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    86
	"HELIPAD1",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    87
	"HELIPAD2",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    88
	"TAKEOFF",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    89
	"STARTTAKEOFF",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    90
	"ENDTAKEOFF",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    91
	"HELITAKEOFF",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    92
	"FLYING",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    93
	"LANDING",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    94
	"ENDLANDING",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    95
	"HELILANDING",
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    96
	"HELIENDLANDING",
4059
f1442dfe1c8a (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents: 3876
diff changeset
    97
	"TERM7",
f1442dfe1c8a (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents: 3876
diff changeset
    98
	"TERM8",
f1442dfe1c8a (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents: 3876
diff changeset
    99
	"HELIPAD3",
f1442dfe1c8a (svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents: 3876
diff changeset
   100
	"HELIPAD4",
4434
4175805666a5 (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents: 4294
diff changeset
   101
	"DUMMY" // extra heading for 255
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   102
};
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   103
6853
b3b8bb6c0a48 (svn r10956) [NewGRF_ports] -Codechange: start refactoring the airport specific code to be more generic so it can be used for non-aircraft ports too.
rubidium
parents: 6837
diff changeset
   104
static void AirportPrintOut(uint nof_elements, const AirportFTA *layout, bool full_report)
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   105
{
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   106
	if (!full_report) printf("(P = Current Position; NP = Next Position)\n");
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   107
6853
b3b8bb6c0a48 (svn r10956) [NewGRF_ports] -Codechange: start refactoring the airport specific code to be more generic so it can be used for non-aircraft ports too.
rubidium
parents: 6837
diff changeset
   108
	for (uint i = 0; i < nof_elements; i++) {
6413
3d660a812fbd (svn r8822) -Fix
tron
parents: 6367
diff changeset
   109
		for (const AirportFTA *current = &layout[i]; current != NULL; current = current->next) {
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   110
			if (full_report) {
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   111
				byte heading = (current->heading == 255) ? MAX_HEADINGS + 1 : current->heading;
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   112
				printf("\tPos:%2d NPos:%2d Heading:%15s Block:%2d\n", current->position,
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   113
					    current->next_position, _airport_heading_strings[heading],
6871
5a9dc001e1ad (svn r11566) [NewGRF_ports] -Sync: with trunk r11218:r11565.
rubidium
parents: 6856
diff changeset
   114
							FindLastBit(current->block));
2549
f1d3b383d557 (svn r3078) Some more stuff, which piled up:
tron
parents: 2186
diff changeset
   115
			} else {
4843
724322df355a (svn r6769) -Codechange: Minor syntax, const correctness, variable localization, coding
Darkvater
parents: 4842
diff changeset
   116
				printf("P:%2d NP:%2d", current->position, current->next_position);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   117
			}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   118
		}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   119
		printf("\n");
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   120
	}
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   121
}
2549
f1d3b383d557 (svn r3078) Some more stuff, which piled up:
tron
parents: 2186
diff changeset
   122
#endif
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   123
6818
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   124
std::list<uint16> GetAvailableAirports()
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   125
{
6818
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   126
	std::list<uint16> airports;
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   127
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   128
	for (uint i = 0; i < GetNumFSMportsClasses(); i++) {
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   129
		for (uint j = 0; j < GetNumCustomFSMports((FSMportsClassID)i); j++) {
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   130
			const FSMportsSpec *spec = GetCustomFSMportsSpec((FSMportsClassID)i, j);
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   131
6871
5a9dc001e1ad (svn r11566) [NewGRF_ports] -Sync: with trunk r11218:r11565.
rubidium
parents: 6856
diff changeset
   132
			if (!HasBit(spec->callbackmask, CBM_STATION_AVAIL) ||
6818
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   133
					GetFSMportsCallback(CBID_STATION_AVAILABILITY, 0, 0, spec, NULL, INVALID_TILE) != 0) {
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   134
				airports.push_back(i << 8 | j);
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   135
			}
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   136
		}
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   137
	}
6818
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   138
8c977ca780fe (svn r10898) [NewGRF_ports] -Codechange: replace GetAirport and GetValidAiports by GetAvailableAirports which gives a list of available airports that (primarily) AIs can iterate over.
rubidium
parents: 6769
diff changeset
   139
	return airports;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   140
}