(svn r19205) -Codechange: move AirportSpec to newgrf_airport.h/cpp

This commit is contained in:
yexo
2010-02-22 16:09:26 +00:00
parent 5ebc0a16c8
commit dd7c2b2f9d
10 changed files with 111 additions and 57 deletions

View File

@@ -13,8 +13,6 @@
#define AIRPORT_H
#include "direction_type.h"
#include "map_type.h"
#include "date_type.h"
/** Some airport-related constants */
enum {
@@ -42,36 +40,6 @@ enum {
AT_DUMMY = 255
};
/* Copy from station_map.h */
typedef byte StationGfx;
struct AirportTileTable {
TileIndexDiffC ti;
StationGfx gfx;
};
/**
* Defines the data structure for an airport.
*/
struct AirportSpec {
const AirportTileTable * const *table; ///< list of the tiles composing the airport
const TileIndexDiffC *depot_table; ///< gives the position of the depots on the airports
byte nof_depots; ///< the number of depots in this airport
byte size_x; ///< size of airport in x direction
byte size_y; ///< size of airport in y direction
byte noise_level; ///< noise that this airport generates
byte catchment; ///< catchment area of this airport
Year min_year; ///< first year the airport is available
Year max_year; ///< last year the airport is available
static const AirportSpec *Get(byte type);
bool IsAvailable() const;
static AirportSpec dummy;
static AirportSpec oilrig;
};
enum {
AMED_NOSPDCLAMP = 1 << 0,
AMED_TAKEOFF = 1 << 1,