From e18436477b1e88813d285bf95720de7be7d9edf1 Mon Sep 17 00:00:00 2001 From: terkhen Date: Fri, 12 Mar 2010 19:38:00 +0000 Subject: [PATCH] (svn r19392) -Codechange: Increase the maximum size of a TileArea. --- src/saveload/industry_sl.cpp | 4 ++-- src/saveload/oldloader_sl.cpp | 6 +++--- src/saveload/station_sl.cpp | 16 ++++++++-------- src/tilearea_type.h | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index 9fef37935a..9b4dd2b3db 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -18,8 +18,8 @@ static const SaveLoad _industry_desc[] = { SLE_CONDVAR(Industry, location.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), SLE_CONDVAR(Industry, location.tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_VAR(Industry, location.w, SLE_UINT8), - SLE_VAR(Industry, location.h, SLE_UINT8), + SLE_VAR(Industry, location.w, SLE_FILE_U8 | SLE_VAR_U16), + SLE_VAR(Industry, location.h, SLE_FILE_U8 | SLE_VAR_U16), SLE_REF(Industry, town, REF_TOWN), SLE_CONDNULL( 2, 0, 60), ///< used to be industry's produced_cargo SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 2, 78, SL_MAX_VERSION), diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index b2eec5a1a7..f745808c0b 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -714,7 +714,7 @@ static const OldChunks station_chunk[] = { OCL_SVAR( OC_TILE, Station, train_station.tile ), OCL_SVAR( OC_TILE, Station, airport.tile ), OCL_SVAR( OC_TILE, Station, dock_tile ), - OCL_SVAR( OC_UINT8, Station, train_station.w ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Station, train_station.w ), OCL_NULL( 1 ), ///< sort-index, no longer in use OCL_NULL( 2 ), ///< sign-width, no longer in use @@ -780,8 +780,8 @@ static bool LoadOldStation(LoadgameState *ls, int num) static const OldChunks industry_chunk[] = { OCL_SVAR( OC_TILE, Industry, location.tile ), OCL_VAR ( OC_UINT32, 1, &_old_town_index ), - OCL_SVAR( OC_UINT8, Industry, location.w ), - OCL_SVAR( OC_UINT8, Industry, location.h ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Industry, location.w ), + OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Industry, location.h ), OCL_NULL( 2 ), ///< used to be industry's produced_cargo OCL_SVAR( OC_TTD | OC_UINT16, Industry, produced_cargo_waiting[0] ), diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index fae4fe5ec2..c705e2b61f 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -156,8 +156,8 @@ static const SaveLoad _old_station_desc[] = { SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLE_REF(Station, town, REF_TOWN), - SLE_VAR(Station, train_station.w, SLE_UINT8), - SLE_CONDVAR(Station, train_station.h, SLE_UINT8, 2, SL_MAX_VERSION), + SLE_VAR(Station, train_station.w, SLE_FILE_U8 | SLE_VAR_U16), + SLE_CONDVAR(Station, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, 2, SL_MAX_VERSION), SLE_CONDNULL(1, 0, 3), ///< alpha_order @@ -325,15 +325,15 @@ static const SaveLoad _station_desc[] = { SLE_ST_INCLUDE(), SLE_VAR(Station, train_station.tile, SLE_UINT32), - SLE_VAR(Station, train_station.w, SLE_UINT8), - SLE_VAR(Station, train_station.h, SLE_UINT8), + SLE_VAR(Station, train_station.w, SLE_FILE_U8 | SLE_VAR_U16), + SLE_VAR(Station, train_station.h, SLE_FILE_U8 | SLE_VAR_U16), SLE_REF(Station, bus_stops, REF_ROADSTOPS), SLE_REF(Station, truck_stops, REF_ROADSTOPS), SLE_VAR(Station, dock_tile, SLE_UINT32), SLE_VAR(Station, airport.tile, SLE_UINT32), - SLE_CONDVAR(Station, airport.w, SLE_UINT8, 140, SL_MAX_VERSION), - SLE_CONDVAR(Station, airport.h, SLE_UINT8, 140, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.w, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION), + SLE_CONDVAR(Station, airport.h, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION), SLE_VAR(Station, airport_type, SLE_UINT8), SLE_VAR(Station, airport_flags, SLE_UINT64), @@ -356,8 +356,8 @@ static const SaveLoad _waypoint_desc[] = { SLE_VAR(Waypoint, town_cn, SLE_UINT16), SLE_CONDVAR(Waypoint, train_station.tile, SLE_UINT32, 124, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, train_station.w, SLE_UINT8, 124, SL_MAX_VERSION), - SLE_CONDVAR(Waypoint, train_station.h, SLE_UINT8, 124, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, train_station.w, SLE_FILE_U8 | SLE_VAR_U16, 124, SL_MAX_VERSION), + SLE_CONDVAR(Waypoint, train_station.h, SLE_FILE_U8 | SLE_VAR_U16, 124, SL_MAX_VERSION), SLE_END() }; diff --git a/src/tilearea_type.h b/src/tilearea_type.h index 4eeaf1e481..711ac986db 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -17,8 +17,8 @@ /** Represents the covered area of e.g. a rail station */ struct TileArea { TileIndex tile; ///< The base tile of the area - uint8 w; ///< The width of the area - uint8 h; ///< The height of the area + uint16 w; ///< The width of the area + uint16 h; ///< The height of the area /** Just construct this tile area */ TileArea() {}