mirror of https://github.com/OpenTTD/OpenTTD
(svn r20331) -Doc: some more airport-related code
parent
aae7ef73bb
commit
689d4bef04
|
@ -128,11 +128,12 @@ static const uint64
|
||||||
|
|
||||||
NOTHING_block = 1ULL << 30;
|
NOTHING_block = 1ULL << 30;
|
||||||
|
|
||||||
|
/** A single location on an airport where aircraft can move to. */
|
||||||
struct AirportMovingData {
|
struct AirportMovingData {
|
||||||
int16 x;
|
int16 x; ///< x-coordinate of this position
|
||||||
int16 y;
|
int16 y; ///< y-coordinate of this position
|
||||||
uint16 flag;
|
uint16 flag; ///< special flags when moving towards this position
|
||||||
DirectionByte direction;
|
DirectionByte direction; ///< Direction to turn the aircraft after reaching this position.
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AirportFTAbuildup;
|
struct AirportFTAbuildup;
|
||||||
|
@ -140,11 +141,12 @@ struct AirportFTAbuildup;
|
||||||
/** Finite sTate mAchine --> FTA */
|
/** Finite sTate mAchine --> FTA */
|
||||||
struct AirportFTAClass {
|
struct AirportFTAClass {
|
||||||
public:
|
public:
|
||||||
|
/** Bitmask of airport flags. */
|
||||||
enum Flags {
|
enum Flags {
|
||||||
AIRPLANES = 0x1,
|
AIRPLANES = 0x1, ///< Can planes land on this airport type?
|
||||||
HELICOPTERS = 0x2,
|
HELICOPTERS = 0x2, ///< Can helicopters land on this airport type?
|
||||||
ALL = AIRPLANES | HELICOPTERS,
|
ALL = AIRPLANES | HELICOPTERS, ///< Mask to check for both planes and helicopters.
|
||||||
SHORT_STRIP = 0x4
|
SHORT_STRIP = 0x4 ///< This airport has a short landing strip, dangerous for fast aircraft.
|
||||||
};
|
};
|
||||||
|
|
||||||
AirportFTAClass(
|
AirportFTAClass(
|
||||||
|
|
|
@ -56,6 +56,7 @@ AirportSpec AirportSpec::specs[NUM_AIRPORTS];
|
||||||
return &AirportSpec::specs[type];
|
return &AirportSpec::specs[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check if this airport is available to build. */
|
||||||
bool AirportSpec::IsAvailable() const
|
bool AirportSpec::IsAvailable() const
|
||||||
{
|
{
|
||||||
if (!this->enabled) return false;
|
if (!this->enabled) return false;
|
||||||
|
|
|
@ -20,9 +20,10 @@
|
||||||
/* Copy from station_map.h */
|
/* Copy from station_map.h */
|
||||||
typedef byte StationGfx;
|
typedef byte StationGfx;
|
||||||
|
|
||||||
|
/** Tile-offset / AirportTileID pair. */
|
||||||
struct AirportTileTable {
|
struct AirportTileTable {
|
||||||
TileIndexDiffC ti;
|
TileIndexDiffC ti; ///< Tile offset from the top-most airport tile.
|
||||||
StationGfx gfx;
|
StationGfx gfx; ///< AirportTile to use for this tile.
|
||||||
};
|
};
|
||||||
|
|
||||||
/** List of default airport classes. */
|
/** List of default airport classes. */
|
||||||
|
@ -48,8 +49,8 @@ enum TTDPAirportType {
|
||||||
|
|
||||||
/** A list of all hangar tiles in an airport */
|
/** A list of all hangar tiles in an airport */
|
||||||
struct HangarTileTable {
|
struct HangarTileTable {
|
||||||
TileIndexDiffC ti;
|
TileIndexDiffC ti; ///< Tile offset from the top-most airport tile.
|
||||||
byte hangar_num;
|
byte hangar_num; ///< The hanger to which this tile belongs.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue