summaryrefslogtreecommitdiff
path: root/src/newgrf_airport.h
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-05 23:21:56 +0000
committeryexo <yexo@openttd.org>2010-03-05 23:21:56 +0000
commitb8d7680e6623bf840d1aaf8bf91ebcda4ee2078d (patch)
treee16e656e9e49a365d728088030b4b50c5bebf39d /src/newgrf_airport.h
parent585b036c90b9984bf5a1ecc79e6932182fa8adc0 (diff)
downloadopenttd-b8d7680e6623bf840d1aaf8bf91ebcda4ee2078d.tar.xz
(svn r19328) -Feature: a more extendable gui for building airports
Diffstat (limited to 'src/newgrf_airport.h')
-rw-r--r--src/newgrf_airport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h
index cb542f316..261963b6a 100644
--- a/src/newgrf_airport.h
+++ b/src/newgrf_airport.h
@@ -71,6 +71,13 @@ struct AirportSpec {
static void ResetAirports();
+ /** Get the index of this spec. */
+ byte GetIndex() const
+ {
+ assert(this >= specs && this < endof(specs));
+ return (byte)(this - specs);
+ }
+
static AirportSpec dummy;
static AirportSpec oilrig;