Mercurial > hg > openttd
changeset 5995:c72b07427c7f draft
(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
author | celestar <celestar@openttd.org> |
---|---|
date | Tue, 13 Feb 2007 12:34:54 +0000 |
parents | f7885ece4c67 |
children | ce1790a98063 |
files | src/airport.h src/airport_movement.h src/saveload.cpp src/station.h src/station_cmd.cpp |
diffstat | 5 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/airport.h +++ b/src/airport.h @@ -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 +++ 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;
--- 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!
--- a/src/station.h +++ b/src/station.h @@ -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 +++ b/src/station_cmd.cpp @@ -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),