Changeset - r14604:fe6b640c98bf
[Not reviewed]
master
0 6 0
yexo - 15 years ago 2010-02-22 14:09:30
yexo@openttd.org
(svn r19191) -Codechange: move AirportTileSpec to newgrf_airporttiles.h
6 files changed with 19 insertions and 24 deletions:
0 comments (0 inline, 0 general)
projects/openttd_vs80.vcproj
Show inline comments
 
@@ -1145,12 +1145,16 @@
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_airporttiles.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_callbacks.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_canal.h"
 
				>
 
@@ -3169,12 +3173,16 @@
 
			>
 
			<File
 
				RelativePath=".\..\src\newgrf.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_airporttiles.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_canal.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_cargo.cpp"
 
				>
projects/openttd_vs90.vcproj
Show inline comments
 
@@ -1142,12 +1142,16 @@
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_airporttiles.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_callbacks.h"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_canal.h"
 
				>
 
@@ -3166,12 +3170,16 @@
 
			>
 
			<File
 
				RelativePath=".\..\src\newgrf.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_airporttiles.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_canal.cpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\newgrf_cargo.cpp"
 
				>
source.list
Show inline comments
 
@@ -193,12 +193,13 @@ network/network_gamelist.h
 
network/network_gui.h
 
network/network_internal.h
 
network/network_server.h
 
network/network_type.h
 
network/network_udp.h
 
newgrf.h
 
newgrf_airporttiles.h
 
newgrf_callbacks.h
 
newgrf_canal.h
 
newgrf_cargo.h
 
newgrf_commons.h
 
newgrf_config.h
 
newgrf_engine.h
 
@@ -738,12 +739,13 @@ spriteloader/png.cpp
 
spriteloader/png.hpp
 
#end
 
spriteloader/spriteloader.hpp
 

	
 
# NewGRF
 
newgrf.cpp
 
newgrf_airporttiles.cpp
 
newgrf_canal.cpp
 
newgrf_cargo.cpp
 
newgrf_commons.cpp
 
newgrf_config.cpp
 
newgrf_engine.cpp
 
newgrf_generic.cpp
src/airport.cpp
Show inline comments
 
@@ -15,13 +15,12 @@
 
#include "table/airport_movement.h"
 
#include "core/alloc_func.hpp"
 
#include "date_func.h"
 
#include "settings_type.h"
 
#include "table/airporttile_ids.h"
 
#include "table/airport_defaults.h"
 
#include "table/airporttiles.h"
 

	
 
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR};
 
AirportSpec AirportSpec::oilrig = {NULL, NULL, 0, 1, 1, 0, 4, MIN_YEAR, MIN_YEAR};
 

	
 

	
 
/**
 
@@ -34,24 +33,12 @@ AirportSpec AirportSpec::oilrig = {NULL,
 
	if (type == AT_OILRIG) return &oilrig;
 
	assert(type < NUM_AIRPORTS);
 
	extern const AirportSpec _origin_airport_specs[];
 
	return &_origin_airport_specs[type];
 
}
 

	
 
/**
 
 * Retrieve airport tile spec for the given airport tile
 
 * @param gfx index of airport tile
 
 * @return A pointer to the corresponding AirportTileSpec
 
 */
 
/* static */ const AirportTileSpec *AirportTileSpec::Get(StationGfx gfx)
 
{
 
	assert(gfx < NUM_AIRPORTTILES);
 
	extern const AirportTileSpec _origin_airporttile_specs[];
 
	return &_origin_airporttile_specs[gfx];
 
}
 

	
 
/* Uncomment this to print out a full report of the airport-structure
 
 * You should either use
 
 * - true: full-report, print out every state and choice with string-names
 
 * OR
 
 * - false: give a summarized report which only shows current and next position */
 
//#define DEBUG_AIRPORT false
src/airport.h
Show inline comments
 
@@ -67,23 +67,12 @@ struct AirportSpec {
 
	bool IsAvailable() const;
 

	
 
	static AirportSpec dummy;
 
	static AirportSpec oilrig;
 
};
 

	
 

	
 
/**
 
 * Defines the data structure of each indivudual tile of an airport.
 
 */
 
struct AirportTileSpec {
 
	uint16 animation_info;                ///< Information about the animation (is it looping, how many loops etc)
 
	uint8 animation_speed;                ///< The speed of the animation
 

	
 
	static const AirportTileSpec *Get(StationGfx gfx);
 
};
 

	
 
enum {
 
	AMED_NOSPDCLAMP = 1 << 0,
 
	AMED_TAKEOFF    = 1 << 1,
 
	AMED_SLOWTURN   = 1 << 2,
 
	AMED_LAND       = 1 << 3,
 
	AMED_EXACTPOS   = 1 << 4,
src/station_cmd.cpp
Show inline comments
 
@@ -45,12 +45,13 @@
 
#include "pbs.h"
 
#include "debug.h"
 
#include "core/random_func.hpp"
 
#include "company_base.h"
 
#include "newgrf.h"
 
#include "table/airporttile_ids.h"
 
#include "newgrf_airporttiles.h"
 

	
 
#include "table/strings.h"
 

	
 
/**
 
 * Check whether the given tile is a hangar.
 
 * @param t the tile to of whether it is a hangar.
0 comments (0 inline, 0 general)