(svn r10825) [NewGRF_ports] -Feature: Airport subtype (prop 20) is now read. This restricts buildlist and usage of airports to the selected vehicle subtype. NewGRF_ports
authorrichk
Wed, 08 Aug 2007 01:56:10 +0000
branchNewGRF_ports
changeset 6771 5bb52a8ad34e
parent 6770 8400b517b905
child 6772 e51582d405e1
(svn r10825) [NewGRF_ports] -Feature: Airport subtype (prop 20) is now read. This restricts buildlist and usage of airports to the selected vehicle subtype.
Added Seaplanes as new subtype for Airports; bit3=1, value 0x08.
TODO: add Seaplane subtype to aircraft; build, etc.
bin/data/seaplaneport.grf
bin/data/sprites/seaplaneport.nfo
src/airport.h
src/newgrf.cpp
Binary file bin/data/seaplaneport.grf has changed
--- a/bin/data/sprites/seaplaneport.nfo	Tue Aug 07 23:15:28 2007 +0000
+++ b/bin/data/sprites/seaplaneport.nfo	Wed Aug 08 01:56:10 2007 +0000
@@ -21,8 +21,8 @@
 // define GRF ID
 	8 * 68	 08 06 C0 DE D0 0D "Seaplane Airport" 00 "Adds a Small Seaplane Airport" 00
 
-// 12 properties to change, 1 station to change, station id = 0
-	9 * 655	 00 0D 0C 01 00
+// 13 properties to change, 1 station to change, station id = 0
+	9 * 655	 00 0D 0D 01 00
 // Small Seaplane Airport
 // uses normal small airport state machine. Runway moved to lower position
 
@@ -243,7 +243,7 @@
 		1E 01 02
 
 // Prop20 Port Subtype
-//		20 07
+		20 0C
 
 // Prop22 Catchment Area
 		22 04
--- a/src/airport.h	Tue Aug 07 23:15:28 2007 +0000
+++ b/src/airport.h	Wed Aug 08 01:56:10 2007 +0000
@@ -48,7 +48,8 @@
 			AIRPLANES   = 0x1,
 			HELICOPTERS = 0x2,
 			ALL         = AIRPLANES | HELICOPTERS,
-			SHORT_STRIP = 0x4
+			SHORT_STRIP = 0x4,
+			SEAPLANES   = 0x8
 		};
 
 		AirportFTAClass(
--- a/src/newgrf.cpp	Tue Aug 07 23:15:28 2007 +0000
+++ b/src/newgrf.cpp	Wed Aug 08 01:56:10 2007 +0000
@@ -2353,6 +2353,11 @@
 				}
 				break;
 
+			case 0x20: // Port Subtype
+				fsmportspec->portFSM->flags = (AirportFTAClass::Flags)grf_load_byte(&buf);
+				ret = true;
+				break;
+
 			case 0x22: // Catchment Area
 				fsmportspec->portFSM->catchment = grf_load_byte(&buf);
 				ret = true;