summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-02-13 12:34:54 +0000
committercelestar <celestar@openttd.org>2007-02-13 12:34:54 +0000
commit82c696688c9f66c701a2426acc4aed4fd67f2730 (patch)
tree794224f69f4b2276a61e39ad055658d196802fb3
parent4d0f8bac27accffb002e51ba1d80c5814addc173 (diff)
downloadopenttd-82c696688c9f66c701a2426acc4aed4fd67f2730.tar.xz
(svn r8705) -Codechange: Increased the number of airport blocks to 64. This involves changing the enum of airport blocks to a static const uint64 as SOME platforms do not support 64-bit enums
-rw-r--r--src/airport.h5
-rw-r--r--src/airport_movement.h2
-rw-r--r--src/saveload.cpp2
-rw-r--r--src/station.h3
-rw-r--r--src/station_cmd.cpp5
5 files changed, 8 insertions, 9 deletions
diff --git a/src/airport.h b/src/airport.h
index 1b515da5c..ab1b11075 100644
--- a/src/airport.h
+++ b/src/airport.h
@@ -77,7 +77,7 @@ enum {
/* Movement Blocks on Airports */
// blocks (eg_airport_flags)
-enum {
+static const uint64
TERM1_block = 1 << 0,
TERM2_block = 1 << 1,
TERM3_block = 1 << 2,
@@ -119,8 +119,7 @@ enum {
OUT_WAY_block2 = 1 << 31,
// end of new blocks
- NOTHING_block = 1 << 30
-};
+ NOTHING_block = 1 << 30;
typedef struct AirportMovingData {
int16 x;
diff --git a/src/airport_movement.h b/src/airport_movement.h
index 4892a4f32..1b225c808 100644
--- a/src/airport_movement.h
+++ b/src/airport_movement.h
@@ -9,7 +9,7 @@
typedef struct AirportFTAbuildup {
byte position; // the position that an airplane is at
byte heading; // the current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.)
- uint32 block; // the block this position is on on the airport (st->airport_flags)
+ uint64 block; // the block this position is on on the airport (st->airport_flags)
byte next; // next position from this position
} AirportFTAbuildup;
diff --git a/src/saveload.cpp b/src/saveload.cpp
index d694d5487..4335b2da4 100644
--- a/src/saveload.cpp
+++ b/src/saveload.cpp
@@ -30,7 +30,7 @@
#include "variables.h"
#include <setjmp.h>
-extern const uint16 SAVEGAME_VERSION = 45;
+extern const uint16 SAVEGAME_VERSION = 46;
uint16 _sl_version; /// the major savegame version identifier
byte _sl_minor_version; /// the minor savegame version, DO NOT USE!
diff --git a/src/station.h b/src/station.h
index d9f6d0c32..40d5297ef 100644
--- a/src/station.h
+++ b/src/station.h
@@ -139,8 +139,7 @@ struct Station {
Date build_date;
- //uint16 airport_flags;
- uint32 airport_flags;
+ uint64 airport_flags; /// stores which blocks on the airport are taken. was 16 bit earlier on, then 32
StationID index;
byte last_vehicle_type;
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index d994aa7ee..ac597e27b 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2855,8 +2855,9 @@ static const SaveLoad _station_desc[] = {
SLE_CONDNULL(2, 0, 5), // Truck/bus stop status
SLE_CONDNULL(1, 0, 4), // Blocked months
- SLE_CONDVAR(Station, airport_flags, SLE_VAR_U32 | SLE_FILE_U16, 0, 2),
- SLE_CONDVAR(Station, airport_flags, SLE_UINT32, 3, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport_flags, SLE_VAR_U64 | SLE_FILE_U16, 0, 2),
+ SLE_CONDVAR(Station, airport_flags, SLE_VAR_U64 | SLE_FILE_U32, 3, 45),
+ SLE_CONDVAR(Station, airport_flags, SLE_UINT64, 46, SL_MAX_VERSION),
SLE_CONDNULL(2, 0, 25), /* Ex last-vehicle */
SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION),