(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
--- a/src/airport.h Tue Feb 13 11:29:20 2007 +0000
+++ b/src/airport.h Tue Feb 13 12:34:54 2007 +0000
@@ -77,7 +77,7 @@
/* 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 @@
OUT_WAY_block2 = 1 << 31,
// end of new blocks
- NOTHING_block = 1 << 30
-};
+ NOTHING_block = 1 << 30;
typedef struct AirportMovingData {
int16 x;
--- a/src/airport_movement.h Tue Feb 13 11:29:20 2007 +0000
+++ b/src/airport_movement.h Tue Feb 13 12:34:54 2007 +0000
@@ -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;
--- a/src/saveload.cpp Tue Feb 13 11:29:20 2007 +0000
+++ b/src/saveload.cpp Tue Feb 13 12:34:54 2007 +0000
@@ -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!
--- a/src/station.h Tue Feb 13 11:29:20 2007 +0000
+++ b/src/station.h Tue Feb 13 12:34:54 2007 +0000
@@ -139,8 +139,7 @@
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;
--- a/src/station_cmd.cpp Tue Feb 13 11:29:20 2007 +0000
+++ b/src/station_cmd.cpp Tue Feb 13 12:34:54 2007 +0000
@@ -2855,8 +2855,9 @@
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),