No longer save/load water region invalidation states
Move InitializeWaterRegions to AllocateMap No longer ForceUpdate in InitializeWaterRegions
This commit is contained in:
@@ -54,6 +54,5 @@ add_files(
|
||||
train_speed_adaptation.cpp
|
||||
tunnel_sl.cpp
|
||||
vehicle_sl.cpp
|
||||
water_regions_sl.cpp
|
||||
waypoint_sl.cpp
|
||||
)
|
||||
|
@@ -208,7 +208,6 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_SAVEGAME_ID, XSCF_NULL, 1, 1, "slv_savegame_id", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_NEWGRF_LAST_SERVICE, XSCF_NULL, 1, 1, "slv_newgrf_last_service", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_CARGO_TRAVELLED, XSCF_NULL, 1, 1, "slv_cargo_travelled", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_WATER_REGIONS, XSCF_IGNORABLE_ALL, 1, 1, "slv_water_regions", nullptr, nullptr, "WRGN" },
|
||||
|
||||
{ XSLFI_TABLE_PATS, XSCF_NULL, 1, 1, "table_pats", nullptr, nullptr, nullptr },
|
||||
|
||||
|
@@ -157,7 +157,6 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_SAVEGAME_ID, ///< See: SLV_SAVEGAME_ID (PR #10719)
|
||||
XSLFI_NEWGRF_LAST_SERVICE, ///< See: SLV_NEWGRF_LAST_SERVICE (PR #11124)
|
||||
XSLFI_CARGO_TRAVELLED, ///< See: SLV_CARGO_TRAVELLED (PR #11283)
|
||||
XSLFI_WATER_REGIONS, ///< See: SLV_WATER_REGIONS (PR #11435)
|
||||
|
||||
XSLFI_TABLE_PATS, ///< Use upstream table format for PATS
|
||||
|
||||
|
@@ -302,7 +302,6 @@ static const std::vector<ChunkHandler> &ChunkHandlers()
|
||||
extern const ChunkHandlerTable _tunnel_chunk_handlers;
|
||||
extern const ChunkHandlerTable _train_speed_adaptation_chunk_handlers;
|
||||
extern const ChunkHandlerTable _new_signal_chunk_handlers;
|
||||
extern const ChunkHandlerTable _water_region_chunk_handlers;
|
||||
extern const ChunkHandlerTable _debug_chunk_handlers;
|
||||
|
||||
/** List of all chunks in a savegame. */
|
||||
@@ -351,7 +350,6 @@ static const std::vector<ChunkHandler> &ChunkHandlers()
|
||||
_tunnel_chunk_handlers,
|
||||
_train_speed_adaptation_chunk_handlers,
|
||||
_new_signal_chunk_handlers,
|
||||
_water_region_chunk_handlers,
|
||||
_debug_chunk_handlers,
|
||||
};
|
||||
|
||||
|
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file water_regions_sl.cpp Handles saving and loading of water region data */
|
||||
#include "../stdafx.h"
|
||||
|
||||
#include "saveload.h"
|
||||
|
||||
extern SaveLoadVersion _sl_xv_upstream_version;
|
||||
|
||||
struct GetWaterRegionsLoadInfo
|
||||
{
|
||||
static SaveLoadVersion GetLoadVersion()
|
||||
{
|
||||
return _sl_xv_upstream_version != SL_MIN_VERSION ? _sl_xv_upstream_version : SLV_WATER_REGIONS;
|
||||
}
|
||||
};
|
||||
|
||||
static const ChunkHandler water_region_chunk_handlers[] = {
|
||||
MakeUpstreamChunkHandler<'WRGN', GetWaterRegionsLoadInfo>(),
|
||||
};
|
||||
|
||||
extern const ChunkHandlerTable _water_region_chunk_handlers(water_region_chunk_handlers);
|
Reference in New Issue
Block a user