changeset 14614:6991f69e3ad1 draft

(svn r19191) -Codechange: move AirportTileSpec to newgrf_airporttiles.h
author yexo <yexo@openttd.org>
date Mon, 22 Feb 2010 14:09:30 +0000
parents 74d59b9fa003
children a8c743a707e6
files projects/openttd_vs80.vcproj projects/openttd_vs90.vcproj source.list src/airport.cpp src/airport.h src/station_cmd.cpp
diffstat 6 files changed, 19 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -1148,6 +1148,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\newgrf_airporttiles.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\newgrf_callbacks.h"
 				>
 			</File>
@@ -3172,6 +3176,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\newgrf_airporttiles.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\newgrf_canal.cpp"
 				>
 			</File>
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -1145,6 +1145,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\newgrf_airporttiles.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\newgrf_callbacks.h"
 				>
 			</File>
@@ -3169,6 +3173,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\newgrf_airporttiles.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\newgrf_canal.cpp"
 				>
 			</File>
--- a/source.list
+++ b/source.list
@@ -196,6 +196,7 @@
 network/network_type.h
 network/network_udp.h
 newgrf.h
+newgrf_airporttiles.h
 newgrf_callbacks.h
 newgrf_canal.h
 newgrf_cargo.h
@@ -741,6 +742,7 @@
 
 # NewGRF
 newgrf.cpp
+newgrf_airporttiles.cpp
 newgrf_canal.cpp
 newgrf_cargo.cpp
 newgrf_commons.cpp
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -18,7 +18,6 @@
 #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};
@@ -37,18 +36,6 @@
 	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
--- a/src/airport.h
+++ b/src/airport.h
@@ -70,17 +70,6 @@
 	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,
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -48,6 +48,7 @@
 #include "company_base.h"
 #include "newgrf.h"
 #include "table/airporttile_ids.h"
+#include "newgrf_airporttiles.h"
 
 #include "table/strings.h"