Merge branch 'cargo_type_order' into jgrpp

# Conflicts:
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/track_func.h
This commit is contained in:
Jonathan G Rennison
2018-07-02 21:04:06 +01:00
45 changed files with 183 additions and 145 deletions

View File

@@ -193,7 +193,8 @@ static const SaveLoad _town_desc[] = {
SLE_CONDLST(Town, psa_list, REF_STORAGE, 161, SL_MAX_VERSION),
SLE_CONDVAR(Town, cargo_produced, SLE_UINT32, 166, SL_MAX_VERSION),
SLE_CONDVAR(Town, cargo_produced, SLE_FILE_U32 | SLE_VAR_U64, 166, 198),
SLE_CONDVAR(Town, cargo_produced, SLE_UINT64, 199, SL_MAX_VERSION),
/* reserve extra space in savegame here. (currently 30 bytes) */
SLE_CONDNULL(30, 2, SL_MAX_VERSION),
@@ -288,12 +289,13 @@ static void Save_TOWN()
static void Load_TOWN()
{
int index;
uint num_cargo = IsSavegameVersionBefore(199) ? 32 : NUM_CARGO;
while ((index = SlIterateArray()) != -1) {
Town *t = new (index) Town();
SlObject(t, _town_desc);
for (CargoID i = 0; i < NUM_CARGO; i++) {
for (CargoID i = 0; i < num_cargo; i++) {
SlObject(&t->supplied[i], _town_supplied_desc);
}
if (SlXvIsFeaturePresent(XSLFI_SPRINGPP)) {