(svn r9510) [NewGRF_ports] -Codechange: Moved airport layouts from station_cmd.cpp into table/station_air.h. Ultimately, these layouts should be provided by a newgrf. NewGRF_ports
authorrichk
Tue, 27 Mar 2007 21:58:38 +0000
branchNewGRF_ports
changeset 6717 b25cf31294e9
parent 6716 bbe3f6d2dcaf
child 6718 5a8b295aa345
(svn r9510) [NewGRF_ports] -Codechange: Moved airport layouts from station_cmd.cpp into table/station_air.h. Ultimately, these layouts should be provided by a newgrf.
projects/openttd.vcproj
projects/openttd_vs80.vcproj
source.list
src/station_cmd.cpp
src/table/station_air.h
--- a/projects/openttd.vcproj	Tue Mar 27 21:18:53 2007 +0000
+++ b/projects/openttd.vcproj	Tue Mar 27 21:58:38 2007 +0000
@@ -873,6 +873,9 @@
 				RelativePath=".\..\src\table\sprites.h">
 			</File>
 			<File
+				RelativePath=".\..\src\table\station_air.h">
+			</File>
+			<File
 				RelativePath=".\..\src\table\station_land.h">
 			</File>
 			<File
--- a/projects/openttd_vs80.vcproj	Tue Mar 27 21:18:53 2007 +0000
+++ b/projects/openttd_vs80.vcproj	Tue Mar 27 21:58:38 2007 +0000
@@ -1388,6 +1388,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\..\src\table\station_air.h"
+				>
+			</File>
+			<File
 				RelativePath=".\..\src\table\station_land.h"
 				>
 			</File>
--- a/source.list	Tue Mar 27 21:18:53 2007 +0000
+++ b/source.list	Tue Mar 27 21:58:38 2007 +0000
@@ -260,6 +260,7 @@
 table/road_land.h
 table/roadveh.h
 table/sprites.h
+table/station_air.h
 table/station_land.h
 table/strings.h
 table/town_land.h
--- a/src/station_cmd.cpp	Tue Mar 27 21:18:53 2007 +0000
+++ b/src/station_cmd.cpp	Tue Mar 27 21:58:38 2007 +0000
@@ -39,6 +39,7 @@
 #include "misc/autoptr.hpp"
 #include "road.h"
 #include "cargotype.h"
+#include "table/station_air.h"
 
 /**
  * Called if a new block is added to the station-pool
@@ -1368,98 +1369,6 @@
 	return ret;
 }
 
-// FIXME -- need to move to its corresponding Airport variable
-// Country Airfield (small)
-static const byte _airport_sections_country[] = {
-	54, 53, 52, 65,
-	58, 57, 56, 55,
-	64, 63, 63, 62
-};
-
-// City Airport (large)
-static const byte _airport_sections_town[] = {
-	31,  9, 33,  9,  9, 32,
-	27, 36, 29, 34,  8, 10,
-	30, 11, 35, 13, 20, 21,
-	51, 12, 14, 17, 19, 28,
-	38, 13, 15, 16, 18, 39,
-	26, 22, 23, 24, 25, 26
-};
-
-// Metropolitain Airport (large) - 2 runways
-static const byte _airport_sections_metropolitan[] = {
-	 31,  9, 33,  9,  9, 32,
-	 27, 36, 29, 34,  8, 10,
-	 30, 11, 35, 13, 20, 21,
-	102,  8,  8,  8,  8, 28,
-	 83, 84, 84, 84, 84, 83,
-	 26, 23, 23, 23, 23, 26
-};
-
-// International Airport (large) - 2 runways
-static const byte _airport_sections_international[] = {
-	88, 89, 89, 89, 89, 89,  88,
-	51,  8,  8,  8,  8,  8,  32,
-	30,  8, 11, 27, 11,  8,  10,
-	32,  8, 11, 27, 11,  8, 114,
-	87,  8, 11, 85, 11,  8, 114,
-	87,  8,  8,  8,  8,  8,  90,
-	26, 23, 23, 23, 23, 23,  26
-};
-
-// Intercontinental Airport (vlarge) - 4 runways
-static const byte _airport_sections_intercontinental[] = {
-	102, 120,  89,  89,  89,  89,  89,  89, 118,
-	120,  23,  23,  23,  23,  23,  23, 119, 117,
-	 87,  54,  87,   8,   8,   8,   8,  51, 117,
-	 87, 162,  87,  85, 116, 116,   8,   9,  10,
-	 87,   8,   8,  11,  31,  11,   8, 160,  32,
-	 32, 160,   8,  11,  27,  11,   8,   8,  10,
-	 87,   8,   8,  11,  30,  11,   8,   8,  10,
-	 87, 142,   8,  11,  29,  11,  10, 163,  10,
-	 87, 164,  87,   8,   8,   8,  10,  37, 117,
-	 87, 120,  89,  89,  89,  89,  89,  89, 119,
-	121,  23,  23,  23,  23,  23,  23, 119,  37
-};
-
-
-// Commuter Airfield (small)
-static const byte _airport_sections_commuter[] = {
-	85, 30, 115, 115, 32,
-	87, 8,    8,   8, 10,
-	87, 11,  11,  11, 10,
-	26, 23,  23,  23, 26
-};
-
-// Heliport
-static const byte _airport_sections_heliport[] = {
-	66,
-};
-
-// Helidepot
-static const byte _airport_sections_helidepot[] = {
-	124, 32,
-	122, 123
-};
-
-// Helistation
-static const byte _airport_sections_helistation[] = {
-	 32, 134, 159, 158,
-	161, 142, 142, 157
-};
-
-static const byte * const _airport_sections[] = {
-	_airport_sections_country,           // Country Airfield (small)
-	_airport_sections_town,              // City Airport (large)
-	_airport_sections_heliport,          // Heliport
-	_airport_sections_metropolitan,      // Metropolitain Airport (large)
-	_airport_sections_international,     // International Airport (xlarge)
-	_airport_sections_commuter,          // Commuter Airport (small)
-	_airport_sections_helidepot,         // Helidepot
-	_airport_sections_intercontinental,  // Intercontinental Airport (xxlarge)
-	_airport_sections_helistation        // Helistation
-};
-
 /** Place an Airport.
  * @param tile tile where airport will be built
  * @param p1 airport type, @see airport.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/table/station_air.h	Tue Mar 27 21:58:38 2007 +0000
@@ -0,0 +1,97 @@
+/* $Id$ */
+
+/** @file table/station_air.h   Layouts of airports */
+
+/*
+ * The sprites are defined in station_land.h.
+ */
+
+// Country Airfield (small)
+static const byte _airport_sections_country[] = {
+	54, 53, 52, 65,
+	58, 57, 56, 55,
+	64, 63, 63, 62
+};
+
+// City Airport (large)
+static const byte _airport_sections_town[] = {
+	31,  9, 33,  9,  9, 32,
+	27, 36, 29, 34,  8, 10,
+	30, 11, 35, 13, 20, 21,
+	51, 12, 14, 17, 19, 28,
+	38, 13, 15, 16, 18, 39,
+	26, 22, 23, 24, 25, 26
+};
+
+// Metropolitain Airport (large) - 2 runways
+static const byte _airport_sections_metropolitan[] = {
+	 31,  9, 33,  9,  9, 32,
+	 27, 36, 29, 34,  8, 10,
+	 30, 11, 35, 13, 20, 21,
+	102,  8,  8,  8,  8, 28,
+	 83, 84, 84, 84, 84, 83,
+	 26, 23, 23, 23, 23, 26
+};
+
+// International Airport (large) - 2 runways
+static const byte _airport_sections_international[] = {
+	88, 89, 89, 89, 89, 89,  88,
+	51,  8,  8,  8,  8,  8,  32,
+	30,  8, 11, 27, 11,  8,  10,
+	32,  8, 11, 27, 11,  8, 114,
+	87,  8, 11, 85, 11,  8, 114,
+	87,  8,  8,  8,  8,  8,  90,
+	26, 23, 23, 23, 23, 23,  26
+};
+
+// Intercontinental Airport (vlarge) - 4 runways
+static const byte _airport_sections_intercontinental[] = {
+	102, 120,  89,  89,  89,  89,  89,  89, 118,
+	120,  22,  22,  22,  22,  22,  22, 119, 117,
+	 87,  54,  87,   8,   8,   8,   8,  51, 117,
+	 87, 162,  87,  85, 116, 116,   8,   9,  10,
+	 87,   8,   8,  11,  31,  11,   8, 160,  32,
+	 32, 160,   8,  11,  27,  11,   8,   8,  10,
+	 87,   8,   8,  11,  30,  11,   8,   8,  10,
+	 87, 142,   8,  11,  29,  11,  10, 163,  10,
+	 87, 164,  87,   8,   8,   8,  10,  37, 117,
+	 87, 120,  89,  89,  89,  89,  89,  89, 119,
+	121,  22,  22,  22,  22,  22,  22, 119,  37
+};
+
+// Commuter Airfield (small)
+static const byte _airport_sections_commuter[] = {
+	85, 30, 115, 115, 32,
+	87, 8,    8,   8, 10,
+	87, 11,  11,  11, 10,
+	26, 23,  23,  23, 26
+};
+
+// Heliport
+static const byte _airport_sections_heliport[] = {
+	66,
+};
+
+// Helidepot
+static const byte _airport_sections_helidepot[] = {
+	124, 32,
+	122, 123
+};
+
+// Helistation
+static const byte _airport_sections_helistation[] = {
+	 32, 134, 159, 158,
+	161, 142, 142, 157
+};
+
+static const byte * const _airport_sections[] = {
+	_airport_sections_country,           // Country Airfield (small)
+	_airport_sections_town,              // City Airport (large)
+	_airport_sections_heliport,          // Heliport
+	_airport_sections_metropolitan,      // Metropolitain Airport (large)
+	_airport_sections_international,     // International Airport (xlarge)
+	_airport_sections_commuter,          // Commuter Airport (small)
+	_airport_sections_helidepot,         // Helidepot
+	_airport_sections_intercontinental,  // Intercontinental Airport (xxlarge)
+	_airport_sections_helistation        // Helistation
+};