author | rubidium |
Thu, 01 Feb 2007 15:49:12 +0000 | |
changeset 5893 | 7e431a4abebb |
parent 5754 | 086187883012 |
child 5924 | f9e5c4f44bc5 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#ifndef AIRPORT_H |
4 |
#define AIRPORT_H |
|
5 |
||
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
6 |
#include "direction.h" |
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
7 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
8 |
enum {MAX_TERMINALS = 10}; |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
9 |
enum {MAX_HELIPADS = 4}; |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
10 |
enum {MAX_ELEMENTS = 255}; |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
11 |
enum {MAX_HEADINGS = 22}; |
0 | 12 |
|
13 |
// Airport types |
|
14 |
enum { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
15 |
AT_SMALL = 0, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
16 |
AT_LARGE = 1, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
17 |
AT_HELIPORT = 2, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
18 |
AT_METROPOLITAN = 3, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
19 |
AT_INTERNATIONAL = 4, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
20 |
AT_COMMUTER = 5, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
21 |
AT_HELIDEPOT = 6, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
22 |
AT_INTERCON = 7, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
23 |
AT_HELISTATION = 8, |
4059
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
24 |
AT_OILRIG = 15 |
0 | 25 |
}; |
26 |
||
27 |
// do not change unless you change v->subtype too. This aligns perfectly with its current setting |
|
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
28 |
enum AcceptPlanes { |
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
29 |
ACC_BEGIN = 0, |
3697
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
30 |
AIRCRAFT_ONLY = 0, |
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
31 |
ALL = 1, |
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
32 |
HELICOPTERS_ONLY = 2, |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
33 |
ACC_END |
0 | 34 |
}; |
35 |
||
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
36 |
/** Define basic enum properties */ |
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
37 |
template <> struct EnumPropsT<AcceptPlanes> : MakeEnumPropsT<AcceptPlanes, byte, ACC_BEGIN, ACC_END, ACC_END> {}; |
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
38 |
typedef TinyEnumT<AcceptPlanes> AcceptPlanesByte; |
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
39 |
|
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
40 |
enum { |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
41 |
AMED_NOSPDCLAMP = 1 << 0, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
42 |
AMED_TAKEOFF = 1 << 1, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
43 |
AMED_SLOWTURN = 1 << 2, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
44 |
AMED_LAND = 1 << 3, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
45 |
AMED_EXACTPOS = 1 << 4, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
46 |
AMED_BRAKE = 1 << 5, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
47 |
AMED_HELI_RAISE = 1 << 6, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
48 |
AMED_HELI_LOWER = 1 << 7, |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
49 |
}; |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
50 |
|
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
51 |
/* Movement States on Airports (headings target) */ |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
52 |
enum { |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
53 |
TO_ALL = 0, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
54 |
HANGAR = 1, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
55 |
TERM1 = 2, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
56 |
TERM2 = 3, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
57 |
TERM3 = 4, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
58 |
TERM4 = 5, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
59 |
TERM5 = 6, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
60 |
TERM6 = 7, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
61 |
HELIPAD1 = 8, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
62 |
HELIPAD2 = 9, |
4059
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
63 |
TAKEOFF = 10, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
64 |
STARTTAKEOFF = 11, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
65 |
ENDTAKEOFF = 12, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
66 |
HELITAKEOFF = 13, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
67 |
FLYING = 14, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
68 |
LANDING = 15, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
69 |
ENDLANDING = 16, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
70 |
HELILANDING = 17, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
71 |
HELIENDLANDING = 18, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
72 |
TERM7 = 19, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
73 |
TERM8 = 20, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
74 |
HELIPAD3 = 21, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
75 |
HELIPAD4 = 22 |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
76 |
}; |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
77 |
|
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
78 |
/* Movement Blocks on Airports */ |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
79 |
// blocks (eg_airport_flags) |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
80 |
enum { |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
81 |
TERM1_block = 1 << 0, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
82 |
TERM2_block = 1 << 1, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
83 |
TERM3_block = 1 << 2, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
84 |
TERM4_block = 1 << 3, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
85 |
TERM5_block = 1 << 4, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
86 |
TERM6_block = 1 << 5, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
87 |
HELIPAD1_block = 1 << 6, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
88 |
HELIPAD2_block = 1 << 7, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
89 |
RUNWAY_IN_OUT_block = 1 << 8, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
90 |
RUNWAY_IN_block = 1 << 8, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
91 |
AIRPORT_BUSY_block = 1 << 8, |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4171
diff
changeset
|
92 |
RUNWAY_OUT_block = 1 << 9, |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
93 |
TAXIWAY_BUSY_block = 1 << 10, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
94 |
OUT_WAY_block = 1 << 11, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
95 |
IN_WAY_block = 1 << 12, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
96 |
AIRPORT_ENTRANCE_block = 1 << 13, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
97 |
TERM_GROUP1_block = 1 << 14, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
98 |
TERM_GROUP2_block = 1 << 15, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
99 |
HANGAR2_AREA_block = 1 << 16, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
100 |
TERM_GROUP2_ENTER1_block = 1 << 17, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
101 |
TERM_GROUP2_ENTER2_block = 1 << 18, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
102 |
TERM_GROUP2_EXIT1_block = 1 << 19, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
103 |
TERM_GROUP2_EXIT2_block = 1 << 20, |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
104 |
PRE_HELIPAD_block = 1 << 21, |
4059
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
105 |
|
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
106 |
// blocks for new airports |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
107 |
TERM7_block = 1 << 22, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
108 |
TERM8_block = 1 << 23, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
109 |
TERM9_block = 1 << 24, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
110 |
HELIPAD3_block = 1 << 24, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
111 |
TERM10_block = 1 << 25, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
112 |
HELIPAD4_block = 1 << 25, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
113 |
HANGAR1_AREA_block = 1 << 26, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
114 |
OUT_WAY2_block = 1 << 27, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
115 |
IN_WAY2_block = 1 << 28, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
116 |
RUNWAY_IN2_block = 1 << 29, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
117 |
RUNWAY_OUT2_block = 1 << 10, // note re-uses TAXIWAY_BUSY |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
118 |
HELIPAD_GROUP_block = 1 << 13, // note re-uses AIRPORT_ENTRANCE |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
119 |
OUT_WAY_block2 = 1 << 31, |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
120 |
// end of new blocks |
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
121 |
|
b1e1c1193f0a
(svn r5346) - Feature: Add 4 new airports. 2 for aircraft, 2 for helicopters.
richk
parents:
3876
diff
changeset
|
122 |
NOTHING_block = 1 << 30 |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
123 |
}; |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
124 |
|
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
125 |
typedef struct AirportMovingData { |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
126 |
int x,y; |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
127 |
byte flag; |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
128 |
DirectionByte direction; |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
129 |
} AirportMovingData; |
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
130 |
|
0 | 131 |
// Finite sTate mAchine --> FTA |
132 |
typedef struct AirportFTAClass { |
|
3697
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
133 |
byte nofelements; // number of positions the airport consists of |
950
165341d74973
(svn r1440) -Feature: Allows more flexible airport layouts now, as the number of
celestar
parents:
909
diff
changeset
|
134 |
const byte *terminals; |
165341d74973
(svn r1440) -Feature: Allows more flexible airport layouts now, as the number of
celestar
parents:
909
diff
changeset
|
135 |
const byte *helipads; |
3697
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
136 |
byte entry_point; // when an airplane arrives at this airport, enter it at position entry_point |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
137 |
AcceptPlanesByte acc_planes; // accept airplanes or helicopters or both |
3697
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
138 |
const TileIndexDiffC *airport_depots; // gives the position of the depots on the airports |
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
139 |
byte nof_depots; // number of depots this airport has |
ed277943a0fc
(svn r4638) - Codestyle: replacing aligning tabs with spaces
peter1138
parents:
2186
diff
changeset
|
140 |
struct AirportFTA *layout; // state machine for airport |
3876
468642825a10
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
tron
parents:
3701
diff
changeset
|
141 |
byte size_x; |
468642825a10
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
tron
parents:
3701
diff
changeset
|
142 |
byte size_y; |
0 | 143 |
} AirportFTAClass; |
144 |
||
145 |
// internal structure used in openttd - Finite sTate mAchine --> FTA |
|
146 |
typedef struct AirportFTA { |
|
4842
79c4c9167d93
(svn r6768) -Cleanup: For airports change *Airport to *apc (variable naming coding style
Darkvater
parents:
4344
diff
changeset
|
147 |
byte position; // the position that an airplane is at |
79c4c9167d93
(svn r6768) -Cleanup: For airports change *Airport to *apc (variable naming coding style
Darkvater
parents:
4344
diff
changeset
|
148 |
byte next_position; // next position from this position |
79c4c9167d93
(svn r6768) -Cleanup: For airports change *Airport to *apc (variable naming coding style
Darkvater
parents:
4344
diff
changeset
|
149 |
uint32 block; // 32 bit blocks (st->airport_flags), should be enough for the most complex airports |
79c4c9167d93
(svn r6768) -Cleanup: For airports change *Airport to *apc (variable naming coding style
Darkvater
parents:
4344
diff
changeset
|
150 |
byte heading; // heading (current orders), guiding an airplane to its target on an airport |
79c4c9167d93
(svn r6768) -Cleanup: For airports change *Airport to *apc (variable naming coding style
Darkvater
parents:
4344
diff
changeset
|
151 |
struct AirportFTA *next; // possible extra movement choices from this position |
0 | 152 |
} AirportFTA; |
153 |
||
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
950
diff
changeset
|
154 |
void InitializeAirports(void); |
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
950
diff
changeset
|
155 |
void UnInitializeAirports(void); |
4171 | 156 |
const AirportFTAClass *GetAirport(const byte airport_type); |
3701
fdbb6bcab8a2
(svn r4642) - Codechange: reorganise airport.h and airport_movement.h to avoid having 8 copies of the airport FTAs, and make the enums used available elsewhere.
peter1138
parents:
3697
diff
changeset
|
157 |
const AirportMovingData *GetAirportMovingData(byte airport_type, byte position); |
0 | 158 |
|
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
159 |
/** Get buildable airport bitmask. |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
160 |
* @return get all buildable airports at this given time, bitmasked. |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
161 |
* Bit 0 means the small airport is buildable, etc. |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
162 |
* @todo set availability of airports by year, instead of airplane |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
163 |
*/ |
2159
f6284cf5fab0
(svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents:
2153
diff
changeset
|
164 |
uint32 GetValidAirports(void); |
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1093
diff
changeset
|
165 |
|
0 | 166 |
#endif /* AIRPORT_H */ |