diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-01-28 21:54:06 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-02-02 21:39:06 +0000 |
commit | ea4ea628163c735db4c4714966c9bc1c560e0f61 (patch) | |
tree | bbbbaeae65879ec9876f08c42c71b9cad3ef5438 /src/saveload | |
parent | bdf0dc67e98ea551b9f96d91ced301404137620f (diff) | |
download | openttd-ea4ea628163c735db4c4714966c9bc1c560e0f61.tar.xz |
Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared.
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/cargopacket_sl.cpp | 2 | ||||
-rw-r--r-- | src/saveload/company_sl.cpp | 110 | ||||
-rw-r--r-- | src/saveload/depot_sl.cpp | 4 | ||||
-rw-r--r-- | src/saveload/economy_sl.cpp | 10 | ||||
-rw-r--r-- | src/saveload/engine_sl.cpp | 14 | ||||
-rw-r--r-- | src/saveload/group_sl.cpp | 4 | ||||
-rw-r--r-- | src/saveload/industry_sl.cpp | 36 | ||||
-rw-r--r-- | src/saveload/linkgraph_sl.cpp | 2 | ||||
-rw-r--r-- | src/saveload/misc_sl.cpp | 44 | ||||
-rw-r--r-- | src/saveload/order_sl.cpp | 10 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 2 | ||||
-rw-r--r-- | src/saveload/saveload.h | 6 | ||||
-rw-r--r-- | src/saveload/signs_sl.cpp | 8 | ||||
-rw-r--r-- | src/saveload/station_sl.cpp | 64 | ||||
-rw-r--r-- | src/saveload/storage_sl.cpp | 2 | ||||
-rw-r--r-- | src/saveload/story_sl.cpp | 8 | ||||
-rw-r--r-- | src/saveload/subsidy_sl.cpp | 4 | ||||
-rw-r--r-- | src/saveload/town_sl.cpp | 76 | ||||
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 130 | ||||
-rw-r--r-- | src/saveload/waypoint_sl.cpp | 10 |
20 files changed, 273 insertions, 273 deletions
diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp index dc8d4145e..9ed6e9e0d 100644 --- a/src/saveload/cargopacket_sl.cpp +++ b/src/saveload/cargopacket_sl.cpp @@ -104,7 +104,7 @@ const SaveLoad *GetCargoPacketDesc() SLE_CONDVAR(CargoPacket, source_id, SLE_UINT16, 125, SL_MAX_VERSION), /* Used to be paid_for, but that got changed. */ - SLE_CONDNULL(1, 0, 120), + SLE_CONDNULL(1, 0, 121), SLE_END() }; diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index 1782e7c28..985293369 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -251,24 +251,24 @@ static const SaveLoad _company_desc[] = { SLE_VAR(CompanyProperties, face, SLE_UINT32), /* money was changed to a 64 bit field in savegame version 1. */ - SLE_CONDVAR(CompanyProperties, money, SLE_VAR_I64 | SLE_FILE_I32, 0, 0), + SLE_CONDVAR(CompanyProperties, money, SLE_VAR_I64 | SLE_FILE_I32, 0, 1), SLE_CONDVAR(CompanyProperties, money, SLE_INT64, 1, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, current_loan, SLE_VAR_I64 | SLE_FILE_I32, 0, 64), + SLE_CONDVAR(CompanyProperties, current_loan, SLE_VAR_I64 | SLE_FILE_I32, 0, 65), SLE_CONDVAR(CompanyProperties, current_loan, SLE_INT64, 65, SL_MAX_VERSION), SLE_VAR(CompanyProperties, colour, SLE_UINT8), SLE_VAR(CompanyProperties, money_fraction, SLE_UINT8), - SLE_CONDNULL(1, 0, 57), ///< avail_railtypes + SLE_CONDNULL(1, 0, 58), ///< avail_railtypes SLE_VAR(CompanyProperties, block_preview, SLE_UINT8), - SLE_CONDNULL(2, 0, 93), ///< cargo_types - SLE_CONDNULL(4, 94, 169), ///< cargo_types - SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDNULL(2, 0, 94), ///< cargo_types + SLE_CONDNULL(4, 94, 170), ///< cargo_types + SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(CompanyProperties, location_of_HQ, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(CompanyProperties, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(CompanyProperties, inaugurated_year, SLE_INT32, 31, SL_MAX_VERSION), SLE_ARR(CompanyProperties, share_owners, SLE_UINT8, 4), @@ -276,19 +276,19 @@ static const SaveLoad _company_desc[] = { SLE_VAR(CompanyProperties, num_valid_stat_ent, SLE_UINT8), SLE_VAR(CompanyProperties, months_of_bankruptcy, SLE_UINT8), - SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_FILE_U8 | SLE_VAR_U16, 0, 104), SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_UINT16, 104, SL_MAX_VERSION), SLE_VAR(CompanyProperties, bankrupt_timeout, SLE_INT16), - SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_VAR_I64 | SLE_FILE_I32, 0, 64), + SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_VAR_I64 | SLE_FILE_I32, 0, 65), SLE_CONDVAR(CompanyProperties, bankrupt_value, SLE_INT64, 65, SL_MAX_VERSION), /* yearly expenses was changed to 64-bit in savegame version 2. */ - SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 1), + SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_FILE_I32 | SLE_VAR_I64, 3 * 13, 0, 2), SLE_CONDARR(CompanyProperties, yearly_expenses, SLE_INT64, 3 * 13, 2, SL_MAX_VERSION), SLE_CONDVAR(CompanyProperties, is_ai, SLE_BOOL, 2, SL_MAX_VERSION), - SLE_CONDNULL(1, 107, 111), ///< is_noai - SLE_CONDNULL(1, 4, 99), + SLE_CONDNULL(1, 107, 112), ///< is_noai + SLE_CONDNULL(1, 4, 100), SLE_CONDVAR(CompanyProperties, terraform_limit, SLE_UINT32, 156, SL_MAX_VERSION), SLE_CONDVAR(CompanyProperties, clear_limit, SLE_UINT32, 156, SL_MAX_VERSION), @@ -299,7 +299,7 @@ static const SaveLoad _company_desc[] = { static const SaveLoad _company_settings_desc[] = { /* Engine renewal settings */ - SLE_CONDNULL(512, 16, 18), + SLE_CONDNULL(512, 16, 19), SLE_CONDREF(Company, engine_renew_list, REF_ENGINE_RENEWS, 19, SL_MAX_VERSION), SLE_CONDVAR(Company, settings.engine_renew, SLE_BOOL, 16, SL_MAX_VERSION), SLE_CONDVAR(Company, settings.engine_renew_months, SLE_INT16, 16, SL_MAX_VERSION), @@ -313,15 +313,15 @@ static const SaveLoad _company_settings_desc[] = { SLE_CONDVAR(Company, settings.vehicle.servint_aircraft, SLE_UINT16, 120, SL_MAX_VERSION), SLE_CONDVAR(Company, settings.vehicle.servint_ships, SLE_UINT16, 120, SL_MAX_VERSION), - SLE_CONDNULL(63, 2, 143), // old reserved space + SLE_CONDNULL(63, 2, 144), // old reserved space SLE_END() }; static const SaveLoad _company_settings_skip_desc[] = { /* Engine renewal settings */ - SLE_CONDNULL(512, 16, 18), - SLE_CONDNULL(2, 19, 68), // engine_renew_list + SLE_CONDNULL(512, 16, 19), + SLE_CONDNULL(2, 19, 69), // engine_renew_list SLE_CONDNULL(4, 69, SL_MAX_VERSION), // engine_renew_list SLE_CONDNULL(1, 16, SL_MAX_VERSION), // settings.engine_renew SLE_CONDNULL(2, 16, SL_MAX_VERSION), // settings.engine_renew_months @@ -335,22 +335,22 @@ static const SaveLoad _company_settings_skip_desc[] = { SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_aircraft SLE_CONDNULL(2, 120, SL_MAX_VERSION), // settings.vehicle.servint_ships - SLE_CONDNULL(63, 2, 143), // old reserved space + SLE_CONDNULL(63, 2, 144), // old reserved space SLE_END() }; static const SaveLoad _company_economy_desc[] = { /* these were changed to 64-bit in savegame format 2 */ - SLE_CONDVAR(CompanyEconomyEntry, income, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), + SLE_CONDVAR(CompanyEconomyEntry, income, SLE_FILE_I32 | SLE_VAR_I64, 0, 2), SLE_CONDVAR(CompanyEconomyEntry, income, SLE_INT64, 2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), + SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_FILE_I32 | SLE_VAR_I64, 0, 2), SLE_CONDVAR(CompanyEconomyEntry, expenses, SLE_INT64, 2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 1), + SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_FILE_I32 | SLE_VAR_I64, 0, 2), SLE_CONDVAR(CompanyEconomyEntry, company_value, SLE_INT64, 2, SL_MAX_VERSION), - SLE_CONDVAR(CompanyEconomyEntry, delivered_cargo[NUM_CARGO - 1], SLE_INT32, 0, 169), - SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, 32, 170, 198), + SLE_CONDVAR(CompanyEconomyEntry, delivered_cargo[NUM_CARGO - 1], SLE_INT32, 0, 170), + SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, 32, 170, 199), SLE_CONDARR(CompanyEconomyEntry, delivered_cargo, SLE_UINT32, NUM_CARGO, 199, SL_MAX_VERSION), SLE_VAR(CompanyEconomyEntry, performance_history, SLE_INT32), @@ -363,42 +363,42 @@ struct CompanyOldAI { }; static const SaveLoad _company_ai_desc[] = { - SLE_CONDNULL(2, 0, 106), - SLE_CONDNULL(2, 0, 12), - SLE_CONDNULL(4, 13, 106), - SLE_CONDNULL(8, 0, 106), - SLE_CONDVAR(CompanyOldAI, num_build_rec, SLE_UINT8, 0, 106), - SLE_CONDNULL(3, 0, 106), - - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 106), - - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 106), - - SLE_CONDNULL(2, 0, 68), - SLE_CONDNULL(4, 69, 106), - - SLE_CONDNULL(18, 0, 106), - SLE_CONDNULL(20, 0, 106), - SLE_CONDNULL(32, 0, 106), - - SLE_CONDNULL(64, 2, 106), + SLE_CONDNULL(2, 0, 107), + SLE_CONDNULL(2, 0, 13), + SLE_CONDNULL(4, 13, 107), + SLE_CONDNULL(8, 0, 107), + SLE_CONDVAR(CompanyOldAI, num_build_rec, SLE_UINT8, 0, 107), + SLE_CONDNULL(3, 0, 107), + + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(2, 0, 107), + + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(2, 0, 107), + + SLE_CONDNULL(2, 0, 69), + SLE_CONDNULL(4, 69, 107), + + SLE_CONDNULL(18, 0, 107), + SLE_CONDNULL(20, 0, 107), + SLE_CONDNULL(32, 0, 107), + + SLE_CONDNULL(64, 2, 107), SLE_END() }; static const SaveLoad _company_ai_build_rec_desc[] = { - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(2, 0, 5), - SLE_CONDNULL(4, 6, 106), - SLE_CONDNULL(8, 0, 106), + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(2, 0, 6), + SLE_CONDNULL(4, 6, 107), + SLE_CONDNULL(8, 0, 107), SLE_END() }; diff --git a/src/saveload/depot_sl.cpp b/src/saveload/depot_sl.cpp index 861a54173..14a255779 100644 --- a/src/saveload/depot_sl.cpp +++ b/src/saveload/depot_sl.cpp @@ -20,9 +20,9 @@ static TownID _town_index; static const SaveLoad _depot_desc[] = { - SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Depot, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Depot, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_town_index, SLE_UINT16, 0, 140), + SLEG_CONDVAR(_town_index, SLE_UINT16, 0, 141), SLE_CONDREF(Depot, town, REF_TOWN, 141, SL_MAX_VERSION), SLE_CONDVAR(Depot, town_cn, SLE_UINT16, 141, SL_MAX_VERSION), SLE_CONDSTR(Depot, name, SLE_STR, 0, 141, SL_MAX_VERSION), diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp index 0effb5b2f..997a7ae6e 100644 --- a/src/saveload/economy_sl.cpp +++ b/src/saveload/economy_sl.cpp @@ -36,11 +36,11 @@ static void Load_CAPR() } static const SaveLoad _economy_desc[] = { - SLE_CONDNULL(4, 0, 64), // max_loan - SLE_CONDNULL(8, 65, 143), // max_loan - SLE_CONDVAR(Economy, old_max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), - SLE_CONDVAR(Economy, old_max_loan_unround, SLE_INT64, 65, 125), - SLE_CONDVAR(Economy, old_max_loan_unround_fract, SLE_UINT16, 70, 125), + SLE_CONDNULL(4, 0, 65), // max_loan + SLE_CONDNULL(8, 65, 144), // max_loan + SLE_CONDVAR(Economy, old_max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 65), + SLE_CONDVAR(Economy, old_max_loan_unround, SLE_INT64, 65, 126), + SLE_CONDVAR(Economy, old_max_loan_unround_fract, SLE_UINT16, 70, 126), SLE_CONDVAR(Economy, inflation_prices, SLE_UINT64, 126, SL_MAX_VERSION), SLE_CONDVAR(Economy, inflation_payment, SLE_UINT64, 126, SL_MAX_VERSION), SLE_VAR(Economy, fluct, SLE_INT16), diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp index a568fead7..d9552bded 100644 --- a/src/saveload/engine_sl.cpp +++ b/src/saveload/engine_sl.cpp @@ -18,9 +18,9 @@ #include "../safeguards.h" static const SaveLoad _engine_desc[] = { - SLE_CONDVAR(Engine, intro_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Engine, intro_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Engine, intro_date, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Engine, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Engine, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Engine, age, SLE_INT32, 31, SL_MAX_VERSION), SLE_VAR(Engine, reliability, SLE_UINT16), SLE_VAR(Engine, reliability_spd_dec, SLE_UINT16), @@ -31,19 +31,19 @@ static const SaveLoad _engine_desc[] = { SLE_VAR(Engine, duration_phase_2, SLE_UINT16), SLE_VAR(Engine, duration_phase_3, SLE_UINT16), - SLE_CONDNULL(1, 0, 120), + SLE_CONDNULL(1, 0, 121), SLE_VAR(Engine, flags, SLE_UINT8), - SLE_CONDNULL(1, 0, 178), // old preview_company_rank + SLE_CONDNULL(1, 0, 179), // old preview_company_rank SLE_CONDVAR(Engine, preview_asked, SLE_UINT16, 179, SL_MAX_VERSION), SLE_CONDVAR(Engine, preview_company, SLE_UINT8, 179, SL_MAX_VERSION), SLE_VAR(Engine, preview_wait, SLE_UINT8), - SLE_CONDNULL(1, 0, 44), - SLE_CONDVAR(Engine, company_avail, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDNULL(1, 0, 45), + SLE_CONDVAR(Engine, company_avail, SLE_FILE_U8 | SLE_VAR_U16, 0, 104), SLE_CONDVAR(Engine, company_avail, SLE_UINT16, 104, SL_MAX_VERSION), SLE_CONDVAR(Engine, company_hidden, SLE_UINT16, 193, SL_MAX_VERSION), SLE_CONDSTR(Engine, name, SLE_STR, 0, 84, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, 2, 144), // old reserved space SLE_END() }; diff --git a/src/saveload/group_sl.cpp b/src/saveload/group_sl.cpp index 27112a543..9142cceea 100644 --- a/src/saveload/group_sl.cpp +++ b/src/saveload/group_sl.cpp @@ -18,9 +18,9 @@ #include "../safeguards.h" static const SaveLoad _group_desc[] = { - SLE_CONDVAR(Group, name, SLE_NAME, 0, 83), + SLE_CONDVAR(Group, name, SLE_NAME, 0, 84), SLE_CONDSTR(Group, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 163), // num_vehicle + SLE_CONDNULL(2, 0, 164), // num_vehicle SLE_VAR(Group, owner, SLE_UINT8), SLE_VAR(Group, vehicle_type, SLE_UINT8), SLE_VAR(Group, replace_protection, SLE_BOOL), diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index a9c84e62a..7fe667f42 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -20,33 +20,33 @@ static OldPersistentStorage _old_ind_persistent_storage; static const SaveLoad _industry_desc[] = { - SLE_CONDVAR(Industry, location.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Industry, location.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Industry, location.tile, SLE_UINT32, 6, SL_MAX_VERSION), 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, 201), + SLE_CONDNULL( 2, 0, 61), ///< used to be industry's produced_cargo + SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 2, 78, 202), SLE_CONDARR(Industry, produced_cargo, SLE_UINT8, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 3, 70, 201), + SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 3, 70, 202), SLE_CONDARR(Industry, incoming_cargo_waiting, SLE_UINT16, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, produced_cargo_waiting, SLE_UINT16, 2, 0, 201), + SLE_CONDARR(Industry, produced_cargo_waiting, SLE_UINT16, 2, 0, 202), SLE_CONDARR(Industry, produced_cargo_waiting, SLE_UINT16, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, production_rate, SLE_UINT8, 2, 0, 201), + SLE_CONDARR(Industry, production_rate, SLE_UINT8, 2, 0, 202), SLE_CONDARR(Industry, production_rate, SLE_UINT8, 16, 202, SL_MAX_VERSION), - SLE_CONDNULL( 3, 0, 60), ///< used to be industry's accepts_cargo - SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 3, 78, 201), + SLE_CONDNULL( 3, 0, 61), ///< used to be industry's accepts_cargo + SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 3, 78, 202), SLE_CONDARR(Industry, accepts_cargo, SLE_UINT8, 16, 202, SL_MAX_VERSION), SLE_VAR(Industry, prod_level, SLE_UINT8), - SLE_CONDARR(Industry, this_month_production, SLE_UINT16, 2, 0, 201), + SLE_CONDARR(Industry, this_month_production, SLE_UINT16, 2, 0, 202), SLE_CONDARR(Industry, this_month_production, SLE_UINT16, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, this_month_transported, SLE_UINT16, 2, 0, 201), + SLE_CONDARR(Industry, this_month_transported, SLE_UINT16, 2, 0, 202), SLE_CONDARR(Industry, this_month_transported, SLE_UINT16, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, last_month_pct_transported, SLE_UINT8, 2, 0, 201), + SLE_CONDARR(Industry, last_month_pct_transported, SLE_UINT8, 2, 0, 202), SLE_CONDARR(Industry, last_month_pct_transported, SLE_UINT8, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, last_month_production, SLE_UINT16, 2, 0, 201), + SLE_CONDARR(Industry, last_month_production, SLE_UINT16, 2, 0, 202), SLE_CONDARR(Industry, last_month_production, SLE_UINT16, 16, 202, SL_MAX_VERSION), - SLE_CONDARR(Industry, last_month_transported, SLE_UINT16, 2, 0, 201), + SLE_CONDARR(Industry, last_month_transported, SLE_UINT16, 2, 0, 202), SLE_CONDARR(Industry, last_month_transported, SLE_UINT16, 16, 202, SL_MAX_VERSION), SLE_VAR(Industry, counter, SLE_UINT16), @@ -54,24 +54,24 @@ static const SaveLoad _industry_desc[] = { SLE_VAR(Industry, type, SLE_UINT8), SLE_VAR(Industry, owner, SLE_UINT8), SLE_VAR(Industry, random_colour, SLE_UINT8), - SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Industry, last_prod_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Industry, last_prod_year, SLE_INT32, 31, SL_MAX_VERSION), SLE_VAR(Industry, was_cargo_delivered, SLE_UINT8), SLE_CONDVAR(Industry, founder, SLE_UINT8, 70, SL_MAX_VERSION), SLE_CONDVAR(Industry, construction_date, SLE_INT32, 70, SL_MAX_VERSION), SLE_CONDVAR(Industry, construction_type, SLE_UINT8, 70, SL_MAX_VERSION), - SLE_CONDVAR(Industry, last_cargo_accepted_at[0], SLE_INT32, 70, 201), + SLE_CONDVAR(Industry, last_cargo_accepted_at[0], SLE_INT32, 70, 202), SLE_CONDARR(Industry, last_cargo_accepted_at, SLE_INT32, 16, 202, SL_MAX_VERSION), SLE_CONDVAR(Industry, selected_layout, SLE_UINT8, 73, SL_MAX_VERSION), - SLEG_CONDARR(_old_ind_persistent_storage.storage, SLE_UINT32, 16, 76, 160), + SLEG_CONDARR(_old_ind_persistent_storage.storage, SLE_UINT32, 16, 76, 161), SLE_CONDREF(Industry, psa, REF_STORAGE, 161, SL_MAX_VERSION), - SLE_CONDNULL(1, 82, 196), // random_triggers + SLE_CONDNULL(1, 82, 197), // random_triggers SLE_CONDVAR(Industry, random, SLE_UINT16, 82, SL_MAX_VERSION), - SLE_CONDNULL(32, 2, 143), // old reserved space + SLE_CONDNULL(32, 2, 144), // old reserved space SLE_END() }; diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp index 6044316a4..93959370c 100644 --- a/src/saveload/linkgraph_sl.cpp +++ b/src/saveload/linkgraph_sl.cpp @@ -121,7 +121,7 @@ static const SaveLoad _node_desc[] = { * SaveLoad desc for a link graph edge. */ static const SaveLoad _edge_desc[] = { - SLE_CONDNULL(4, 0, 190), // distance + SLE_CONDNULL(4, 0, 191), // distance SLE_VAR(Edge, capacity, SLE_UINT32), SLE_VAR(Edge, usage, SLE_UINT32), SLE_VAR(Edge, last_unrestricted_update, SLE_INT32), diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index c7bd31e81..0be1077a7 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -71,52 +71,52 @@ void ResetViewportAfterLoadGame() byte _age_cargo_skip_counter; ///< Skip aging of cargo? Used before savegame version 162. static const SaveLoadGlobVarList _date_desc[] = { - SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLEG_CONDVAR(_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLEG_CONDVAR(_date, SLE_INT32, 31, SL_MAX_VERSION), SLEG_VAR(_date_fract, SLE_UINT16), SLEG_VAR(_tick_counter, SLE_UINT16), - SLE_CONDNULL(2, 0, 156), // _vehicle_id_ctr_day - SLEG_CONDVAR(_age_cargo_skip_counter, SLE_UINT8, 0, 161), - SLE_CONDNULL(1, 0, 45), - SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDNULL(2, 0, 157), // _vehicle_id_ctr_day + SLEG_CONDVAR(_age_cargo_skip_counter, SLE_UINT8, 0, 162), + SLE_CONDNULL(1, 0, 46), + SLEG_CONDVAR(_cur_tileloop_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLEG_CONDVAR(_cur_tileloop_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLEG_VAR(_disaster_delay, SLE_UINT16), - SLE_CONDNULL(2, 0, 119), + SLE_CONDNULL(2, 0, 120), SLEG_VAR(_random.state[0], SLE_UINT32), SLEG_VAR(_random.state[1], SLE_UINT32), - SLE_CONDNULL(1, 0, 9), - SLE_CONDNULL(4, 10, 119), + SLE_CONDNULL(1, 0, 10), + SLE_CONDNULL(4, 10, 120), SLEG_VAR(_cur_company_tick_index, SLE_FILE_U8 | SLE_VAR_U32), - SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, 0, 108), + SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, 0, 109), SLEG_CONDVAR(_next_competitor_start, SLE_UINT32, 109, SL_MAX_VERSION), SLEG_VAR(_trees_tick_ctr, SLE_UINT8), SLEG_CONDVAR(_pause_mode, SLE_UINT8, 4, SL_MAX_VERSION), - SLE_CONDNULL(4, 11, 119), + SLE_CONDNULL(4, 11, 120), SLEG_END() }; static const SaveLoadGlobVarList _date_check_desc[] = { - SLEG_CONDVAR(_load_check_data.current_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLEG_CONDVAR(_load_check_data.current_date, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLEG_CONDVAR(_load_check_data.current_date, SLE_INT32, 31, SL_MAX_VERSION), SLE_NULL(2), // _date_fract SLE_NULL(2), // _tick_counter - SLE_CONDNULL(2, 0, 156), // _vehicle_id_ctr_day - SLE_CONDNULL(1, 0, 161), // _age_cargo_skip_counter - SLE_CONDNULL(1, 0, 45), - SLE_CONDNULL(2, 0, 5), // _cur_tileloop_tile + SLE_CONDNULL(2, 0, 157), // _vehicle_id_ctr_day + SLE_CONDNULL(1, 0, 162), // _age_cargo_skip_counter + SLE_CONDNULL(1, 0, 46), + SLE_CONDNULL(2, 0, 6), // _cur_tileloop_tile SLE_CONDNULL(4, 6, SL_MAX_VERSION), // _cur_tileloop_tile SLE_NULL(2), // _disaster_delay - SLE_CONDNULL(2, 0, 119), + SLE_CONDNULL(2, 0, 120), SLE_NULL(4), // _random.state[0] SLE_NULL(4), // _random.state[1] - SLE_CONDNULL(1, 0, 9), - SLE_CONDNULL(4, 10, 119), + SLE_CONDNULL(1, 0, 10), + SLE_CONDNULL(4, 10, 120), SLE_NULL(1), // _cur_company_tick_index - SLE_CONDNULL(2, 0, 108), // _next_competitor_start + SLE_CONDNULL(2, 0, 109), // _next_competitor_start SLE_CONDNULL(4, 109, SL_MAX_VERSION), // _next_competitor_start SLE_NULL(1), // _trees_tick_ctr SLE_CONDNULL(1, 4, SL_MAX_VERSION), // _pause_mode - SLE_CONDNULL(4, 11, 119), + SLE_CONDNULL(4, 11, 120), SLEG_END() }; @@ -137,9 +137,9 @@ static void Check_DATE() static const SaveLoadGlobVarList _view_desc[] = { - SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLEG_CONDVAR(_saved_scrollpos_x, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLEG_CONDVAR(_saved_scrollpos_x, SLE_INT32, 6, SL_MAX_VERSION), - SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLEG_CONDVAR(_saved_scrollpos_y, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLEG_CONDVAR(_saved_scrollpos_y, SLE_INT32, 6, SL_MAX_VERSION), SLEG_VAR(_saved_scrollpos_zoom, SLE_UINT8), SLEG_END() diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp index d55d577cb..a56e56892 100644 --- a/src/saveload/order_sl.cpp +++ b/src/saveload/order_sl.cpp @@ -109,14 +109,14 @@ const SaveLoad *GetOrderDescription() SLE_VAR(Order, dest, SLE_UINT16), SLE_REF(Order, next, REF_ORDER), SLE_CONDVAR(Order, refit_cargo, SLE_UINT8, 36, SL_MAX_VERSION), - SLE_CONDNULL(1, 36, 181), // refit_subtype + SLE_CONDNULL(1, 36, 182), // refit_subtype SLE_CONDVAR(Order, wait_time, SLE_UINT16, 67, SL_MAX_VERSION), SLE_CONDVAR(Order, travel_time, SLE_UINT16, 67, SL_MAX_VERSION), SLE_CONDVAR(Order, max_speed, SLE_UINT16, 172, SL_MAX_VERSION), /* Leftover from the minor savegame version stuff * We will never use those free bytes, but we have to keep this line to allow loading of old savegames */ - SLE_CONDNULL(10, 5, 35), + SLE_CONDNULL(10, 5, 36), SLE_END() }; @@ -253,17 +253,17 @@ const SaveLoad *GetOrderBackupDescription() SLE_VAR(OrderBackup, user, SLE_UINT32), SLE_VAR(OrderBackup, tile, SLE_UINT32), SLE_VAR(OrderBackup, group, SLE_UINT16), - SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 0, 191), + SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 0, 192), SLE_CONDVAR(OrderBackup, service_interval, SLE_UINT16, 192, SL_MAX_VERSION), SLE_STR(OrderBackup, name, SLE_STR, 0), - SLE_CONDNULL(2, 0, 191), // clone (2 bytes of pointer, i.e. garbage) + SLE_CONDNULL(2, 0, 192), // clone (2 bytes of pointer, i.e. garbage) SLE_CONDREF(OrderBackup, clone, REF_VEHICLE, 192, SL_MAX_VERSION), SLE_VAR(OrderBackup, cur_real_order_index, SLE_UINT8), SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, 176, SL_MAX_VERSION), SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, 176, SL_MAX_VERSION), SLE_CONDVAR(OrderBackup, lateness_counter, SLE_INT32, 176, SL_MAX_VERSION), SLE_CONDVAR(OrderBackup, timetable_start, SLE_INT32, 176, SL_MAX_VERSION), - SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 176, 179), + SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 176, 180), SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION), SLE_REF(OrderBackup, orders, REF_ORDER), SLE_END() diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index e75e40d74..b20e996ca 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1551,7 +1551,7 @@ static void SlDeque(void *deque, VarType conv) /** Are we going to save this object or not? */ static inline bool SlIsObjectValidInSavegame(const SaveLoad *sld) { - if (_sl_version < sld->version_from || _sl_version > sld->version_to) return false; + if (_sl_version < sld->version_from || _sl_version >= sld->version_to) return false; if (sld->conv & SLF_NOT_IN_SAVE) return false; return true; diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index b6fc59c6e..8a2eeead2 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -483,14 +483,14 @@ static inline bool IsSavegameVersionBefore(uint16 major, byte minor = 0) /** * Checks if some version from/to combination falls within the range of the * active savegame version. - * @param version_from Lowest version number that falls within the range. - * @param version_to Highest version number that falls within the range. + * @param version_from Inclusive savegame version lower bound. + * @param version_to Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound. * @return Active savegame version falls within the given range. */ static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to) { extern const uint16 SAVEGAME_VERSION; - if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION > version_to) return false; + if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION >= version_to) return false; return true; } diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp index 132ac181e..6b838cfc1 100644 --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -19,14 +19,14 @@ /** Description of a sign within the savegame. */ static const SaveLoad _sign_desc[] = { - SLE_CONDVAR(Sign, name, SLE_NAME, 0, 83), + SLE_CONDVAR(Sign, name, SLE_NAME, 0, 84), SLE_CONDSTR(Sign, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDVAR(Sign, x, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), - SLE_CONDVAR(Sign, y, SLE_FILE_I16 | SLE_VAR_I32, 0, 4), + SLE_CONDVAR(Sign, x, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Sign, y, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), SLE_CONDVAR(Sign, x, SLE_INT32, 5, SL_MAX_VERSION), SLE_CONDVAR(Sign, y, SLE_INT32, 5, SL_MAX_VERSION), SLE_CONDVAR(Sign, owner, SLE_UINT8, 6, SL_MAX_VERSION), - SLE_CONDVAR(Sign, z, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), + SLE_CONDVAR(Sign, z, SLE_FILE_U8 | SLE_VAR_I32, 0, 164), SLE_CONDVAR(Sign, z, SLE_INT32, 164, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index ed2ee6954..d9c026cd4 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -150,42 +150,42 @@ void AfterLoadRoadStops() static const SaveLoad _roadstop_desc[] = { SLE_VAR(RoadStop, xy, SLE_UINT32), - SLE_CONDNULL(1, 0, 44), + SLE_CONDNULL(1, 0, 45), SLE_VAR(RoadStop, status, SLE_UINT8), /* Index was saved in some versions, but this is not needed */ - SLE_CONDNULL(4, 0, 8), - SLE_CONDNULL(2, 0, 44), - SLE_CONDNULL(1, 0, 25), + SLE_CONDNULL(4, 0, 9), + SLE_CONDNULL(2, 0, 45), + SLE_CONDNULL(1, 0, 26), SLE_REF(RoadStop, next, REF_ROADSTOPS), - SLE_CONDNULL(2, 0, 44), + SLE_CONDNULL(2, 0, 45), - SLE_CONDNULL(4, 0, 24), - SLE_CONDNULL(1, 25, 25), + SLE_CONDNULL(4, 0, 25), + SLE_CONDNULL(1, 25, 26), SLE_END() }; static const SaveLoad _old_station_desc[] = { - SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Station, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDNULL(4, 0, 5), ///< bus/lorry tile - SLE_CONDVAR(Station, train_station.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDNULL(4, 0, 6), ///< bus/lorry tile + SLE_CONDVAR(Station, train_station.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Station, train_station.tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, airport.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, airport.tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Station, airport.tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Station, dock_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Station, dock_tile, SLE_UINT32, 6, SL_MAX_VERSION), SLE_REF(Station, town, REF_TOWN), 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 + SLE_CONDNULL(1, 0, 4), ///< alpha_order SLE_VAR(Station, string_id, SLE_STRINGID), SLE_CONDSTR(Station, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), SLE_CONDVAR(Station, indtype, SLE_UINT8, 103, SL_MAX_VERSION), - SLE_CONDVAR(Station, had_vehicle_of_type, SLE_FILE_U16 | SLE_VAR_U8, 0, 121), + SLE_CONDVAR(Station, had_vehicle_of_type, SLE_FILE_U16 | SLE_VAR_U8, 0, 122), SLE_CONDVAR(Station, had_vehicle_of_type, SLE_UINT8, 122, SL_MAX_VERSION), SLE_VAR(Station, time_since_load, SLE_UINT8), @@ -195,18 +195,18 @@ static const SaveLoad _old_station_desc[] = { SLE_VAR(Station, facilities, SLE_UINT8), SLE_VAR(Station, airport.type, SLE_UINT8), - SLE_CONDNULL(2, 0, 5), ///< Truck/bus stop status - SLE_CONDNULL(1, 0, 4), ///< Blocked months + SLE_CONDNULL(2, 0, 6), ///< Truck/bus stop status + SLE_CONDNULL(1, 0, 5), ///< Blocked months - 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_VAR_U64 | SLE_FILE_U16, 0, 3), + SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U32, 3, 46), SLE_CONDVAR(Station, airport.flags, SLE_UINT64, 46, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 25), ///< last-vehicle + SLE_CONDNULL(2, 0, 26), ///< last-vehicle SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION), - SLE_CONDNULL(2, 3, 25), ///< custom station class and id - SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), + SLE_CONDNULL(2, 3, 26), ///< custom station class and id + SLE_CONDVAR(Station, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 31), SLE_CONDVAR(Station, build_date, SLE_INT32, 31, SL_MAX_VERSION), SLE_CONDREF(Station, bus_stops, REF_ROADSTOPS, 6, SL_MAX_VERSION), @@ -266,21 +266,21 @@ static const SaveLoad _flow_desc[] = { const SaveLoad *GetGoodsDesc() { static const SaveLoad goods_desc[] = { - SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, 0, 67), + SLEG_CONDVAR( _waiting_acceptance, SLE_UINT16, 0, 68), SLE_CONDVAR(GoodsEntry, status, SLE_UINT8, 68, SL_MAX_VERSION), - SLE_CONDNULL(2, 51, 67), + SLE_CONDNULL(2, 51, 68), SLE_VAR(GoodsEntry, time_since_pickup, SLE_UINT8), SLE_VAR(GoodsEntry, rating, SLE_UINT8), - SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), - SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), - SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 67), + SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), + SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 68), + SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 68), + SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 68), SLE_VAR(GoodsEntry, last_speed, SLE_UINT8), SLE_VAR(GoodsEntry, last_age, SLE_UINT8), - SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, 14, 64), - SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 67), + SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_U32 | SLE_VAR_I64, 14, 65), + SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 68), SLE_CONDVAR(GoodsEntry, amount_fract, SLE_UINT8, 150, SL_MAX_VERSION), - SLEG_CONDLST( _packets, REF_CARGO_PACKET, 68, 182), + SLEG_CONDLST( _packets, REF_CARGO_PACKET, 68, 183), SLEG_CONDVAR( _num_dests, SLE_UINT32, 183, SL_MAX_VERSION), SLE_CONDVAR(GoodsEntry, cargo.reserved_count, SLE_UINT, 181, SL_MAX_VERSION), SLE_CONDVAR(GoodsEntry, link_graph, SLE_UINT16, 183, SL_MAX_VERSION), @@ -431,7 +431,7 @@ static const SaveLoad _station_desc[] = { SLE_CONDVAR(Station, airport.layout, SLE_UINT8, 145, SL_MAX_VERSION), SLE_VAR(Station, airport.flags, SLE_UINT64), SLE_CONDVAR(Station, airport.rotation, SLE_UINT8, 145, SL_MAX_VERSION), - SLEG_CONDARR(_old_st_persistent_storage.storage, SLE_UINT32, 16, 145, 160), + SLEG_CONDARR(_old_st_persistent_storage.storage, SLE_UINT32, 16, 145, 161), SLE_CONDREF(Station, airport.psa, REF_STORAGE, 161, SL_MAX_VERSION), SLE_VAR(Station, indtype, SLE_UINT8), @@ -441,7 +441,7 @@ static const SaveLoad _station_desc[] = { SLE_VAR(Station, last_vehicle_type, SLE_UINT8), SLE_VAR(Station, had_vehicle_of_type, SLE_UINT8), SLE_LST(Station, loading_vehicles, REF_VEHICLE), - SLE_CONDVAR(Station, always_accepted, SLE_FILE_U32 | SLE_VAR_U64, 127, 198), + SLE_CONDVAR(Station, always_accepted, SLE_FILE_U32 | SLE_VAR_U64, 127, 199), SLE_CONDVAR(Station, always_accepted, SLE_UINT64, 199, SL_MAX_VERSION), SLE_END() diff --git a/src/saveload/storage_sl.cpp b/src/saveload/storage_sl.cpp index 04980c7c3..30d438614 100644 --- a/src/saveload/storage_sl.cpp +++ b/src/saveload/storage_sl.cpp @@ -18,7 +18,7 @@ /** Description of the data to save and load in #PersistentStorage. */ static const SaveLoad _storage_desc[] = { SLE_CONDVAR(PersistentStorage, grfid, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 16, 161, 200), + SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 16, 161, 201), SLE_CONDARR(PersistentStorage, storage, SLE_UINT32, 256, 201, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/story_sl.cpp b/src/saveload/story_sl.cpp index 87e3720a6..cbfc847b6 100644 --- a/src/saveload/story_sl.cpp +++ b/src/saveload/story_sl.cpp @@ -29,10 +29,10 @@ void AfterLoadStoryBook() } static const SaveLoad _story_page_elements_desc[] = { - SLE_CONDVAR(StoryPageElement, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), + SLE_CONDVAR(StoryPageElement, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 185), SLE_CONDVAR(StoryPageElement, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, page, SLE_UINT16), - SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), + SLE_CONDVAR(StoryPageElement, type, SLE_FILE_U16 | SLE_VAR_U8, 0, 185), SLE_CONDVAR(StoryPageElement, type, SLE_UINT8, 185, SL_MAX_VERSION), SLE_VAR(StoryPageElement, referenced_id, SLE_UINT32), SLE_STR(StoryPageElement, text, SLE_STR | SLF_ALLOW_CONTROL, 0), @@ -66,10 +66,10 @@ static void Load_STORY_PAGE_ELEMENT() } static const SaveLoad _story_pages_desc[] = { - SLE_CONDVAR(StoryPage, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 184), + SLE_CONDVAR(StoryPage, sort_value, SLE_FILE_U16 | SLE_VAR_U32, 0, 185), SLE_CONDVAR(StoryPage, sort_value, SLE_UINT32, 185, SL_MAX_VERSION), SLE_VAR(StoryPage, date, SLE_UINT32), - SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, 0, 184), + SLE_CONDVAR(StoryPage, company, SLE_FILE_U16 | SLE_VAR_U8, 0, 185), SLE_CONDVAR(StoryPage, company, SLE_UINT8, 185, SL_MAX_VERSION), SLE_STR(StoryPage, title, SLE_STR | SLF_ALLOW_CONTROL, 0), SLE_END() diff --git a/src/saveload/subsidy_sl.cpp b/src/saveload/subsidy_sl.cpp index f6d650468..d796bda1a 100644 --- a/src/saveload/subsidy_sl.cpp +++ b/src/saveload/subsidy_sl.cpp @@ -22,9 +22,9 @@ static const SaveLoad _subsidies_desc[] = { SLE_CONDVAR(Subsidy, awarded, SLE_UINT8, 125, SL_MAX_VERSION), SLE_CONDVAR(Subsidy, src_type, SLE_UINT8, 125, SL_MAX_VERSION), SLE_CONDVAR(Subsidy, dst_type, SLE_UINT8, 125, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, src, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Subsidy, src, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), SLE_CONDVAR(Subsidy, src, SLE_UINT16, 5, SL_MAX_VERSION), - SLE_CONDVAR(Subsidy, dst, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Subsidy, dst, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), SLE_CONDVAR(Subsidy, dst, SLE_UINT16, 5, SL_MAX_VERSION), SLE_END() }; diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 13438d85b..8a8d4a9f7 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -116,12 +116,12 @@ void UpdateHousesAndTowns() /** Save and load of towns. */ static const SaveLoad _town_desc[] = { - SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Town, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Town, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDNULL(2, 0, 2), ///< population, no longer in use - SLE_CONDNULL(4, 3, 84), ///< population, no longer in use - SLE_CONDNULL(2, 0, 91), ///< num_houses, no longer in use + SLE_CONDNULL(2, 0, 3), ///< population, no longer in use + SLE_CONDNULL(4, 3, 85), ///< population, no longer in use + SLE_CONDNULL(2, 0, 92), ///< num_houses, no longer in use SLE_CONDVAR(Town, townnamegrfid, SLE_UINT32, 66, SL_MAX_VERSION), SLE_VAR(Town, townnametype, SLE_UINT16), @@ -129,56 +129,56 @@ static const SaveLoad _town_desc[] = { SLE_CONDSTR(Town, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), SLE_VAR(Town, flags, SLE_UINT8), - SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, 0, 104), SLE_CONDVAR(Town, statues, SLE_UINT16, 104, SL_MAX_VERSION), - SLE_CONDNULL(1, 0, 1), ///< sort_index, no longer in use + SLE_CONDNULL(1, 0, 2), ///< sort_index, no longer in use - SLE_CONDVAR(Town, have_ratings, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), + SLE_CONDVAR(Town, have_ratings, SLE_FILE_U8 | SLE_VAR_U16, 0, 104), SLE_CONDVAR(Town, have_ratings, SLE_UINT16, 104, SL_MAX_VERSION), - SLE_CONDARR(Town, ratings, SLE_INT16, 8, 0, 103), + SLE_CONDARR(Town, ratings, SLE_INT16, 8, 0, 104), SLE_CONDARR(Town, ratings, SLE_INT16, MAX_COMPANIES, 104, SL_MAX_VERSION), /* failed bribe attempts are stored since savegame format 4 */ - SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4, 103), + SLE_CONDARR(Town, unwanted, SLE_INT8, 8, 4, 104), SLE_CONDARR(Town, unwanted, SLE_INT8, MAX_COMPANIES, 104, SL_MAX_VERSION), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), - - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_UINT32, 9, 164), - SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_UINT32, 9, 164), - - SLE_CONDNULL(2, 0, 163), ///< pct_pass_transported / pct_mail_transported, now computed on the fly - - SLE_CONDVAR(Town, received[TE_FOOD].old_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_WATER].old_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_FOOD].new_act, SLE_UINT16, 0, 164), - SLE_CONDVAR(Town, received[TE_WATER].new_act, SLE_UINT16, 0, 164), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_FILE_U16 | SLE_VAR_U32, 0, 9), + + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_max, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_max, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_max, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_max, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].old_act, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_MAIL].old_act, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_PASSENGERS].new_act, SLE_UINT32, 9, 165), + SLE_CONDVAR(Town, supplied[CT_MAIL].new_act, SLE_UINT32, 9, 165), + + SLE_CONDNULL(2, 0, 164), ///< pct_pass_transported / pct_mail_transported, now computed on the fly + + SLE_CONDVAR(Town, received[TE_FOOD].old_act, SLE_UINT16, 0, 165), + SLE_CONDVAR(Town, received[TE_WATER].old_act, SLE_UINT16, 0, 165), + SLE_CONDVAR(Town, received[TE_FOOD].new_act, SLE_UINT16, 0, 165), + SLE_CONDVAR(Town, received[TE_WATER].new_act, SLE_UINT16, 0, 165), SLE_CONDARR(Town, goal, SLE_UINT32, NUM_TE, 165, SL_MAX_VERSION), SLE_CONDSTR(Town, text, SLE_STR | SLF_ALLOW_CONTROL, 0, 168, SL_MAX_VERSION), - SLE_CONDVAR(Town, time_until_rebuild, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), - SLE_CONDVAR(Town, grow_counter, SLE_FILE_U8 | SLE_VAR_U16, 0, 53), - SLE_CONDVAR(Town, growth_rate, SLE_FILE_U8 | SLE_VAR_I16, 0, 53), + SLE_CONDVAR(Town, time_until_rebuild, SLE_FILE_U8 | SLE_VAR_U16, 0, 54), + SLE_CONDVAR(Town, grow_counter, SLE_FILE_U8 | SLE_VAR_U16, 0, 54), + SLE_CONDVAR(Town, growth_rate, SLE_FILE_U8 | SLE_VAR_I16, 0, 54), SLE_CONDVAR(Town, time_until_rebuild, SLE_UINT16, 54, SL_MAX_VERSION), SLE_CONDVAR(Town, grow_counter, SLE_UINT16, 54, SL_MAX_VERSION), - SLE_CONDVAR(Town, growth_rate, SLE_FILE_I16 | SLE_VAR_U16, 54, 164), + SLE_CONDVAR(Town, growth_rate, SLE_FILE_I16 | SLE_VAR_U16, 54, 165), SLE_CONDVAR(Town, growth_rate, SLE_UINT16, 165, SL_MAX_VERSION), SLE_VAR(Town, fund_buildings_months, SLE_UINT8), @@ -192,7 +192,7 @@ static const SaveLoad _town_desc[] = { SLE_CONDLST(Town, psa_list, REF_STORAGE, 161, SL_MAX_VERSION), - SLE_CONDVAR(Town, cargo_produced, SLE_FILE_U32 | SLE_VAR_U64, 166, 198), + SLE_CONDVAR(Town, cargo_produced, SLE_FILE_U32 | SLE_VAR_U64, 166, 199), SLE_CONDVAR(Town, cargo_produced, SLE_UINT64, 199, SL_MAX_VERSION), /* reserve extra space in savegame here. (currently 30 bytes) */ diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 2f3ace415..e2816e8d8 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -586,49 +586,49 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, subtype, SLE_UINT8), SLE_REF(Vehicle, next, REF_VEHICLE_OLD), - SLE_CONDVAR(Vehicle, name, SLE_NAME, 0, 83), + SLE_CONDVAR(Vehicle, name, SLE_NAME, 0, 84), SLE_CONDSTR(Vehicle, name, SLE_STR | SLF_ALLOW_CONTROL, 0, 84, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, unitnumber, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), + SLE_CONDVAR(Vehicle, unitnumber, SLE_FILE_U8 | SLE_VAR_U16, 0, 8), SLE_CONDVAR(Vehicle, unitnumber, SLE_UINT16, 8, SL_MAX_VERSION), SLE_VAR(Vehicle, owner, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, x_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, y_pos, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 164), SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), SLE_VAR(Vehicle, direction, SLE_UINT8), - SLE_CONDNULL(2, 0, 57), + SLE_CONDNULL(2, 0, 58), SLE_VAR(Vehicle, spritenum, SLE_UINT8), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, 0, 58), SLE_VAR(Vehicle, engine_type, SLE_UINT16), - SLE_CONDNULL(2, 0, 151), + SLE_CONDNULL(2, 0, 152), SLE_VAR(Vehicle, cur_speed, SLE_UINT16), SLE_VAR(Vehicle, subspeed, SLE_UINT8), SLE_VAR(Vehicle, acceleration, SLE_UINT8), SLE_VAR(Vehicle, progress, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), - SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), SLE_CONDVAR(Vehicle, last_station_visited, SLE_UINT16, 5, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, last_loading_station, SLE_UINT16, 182, SL_MAX_VERSION), SLE_VAR(Vehicle, cargo_type, SLE_UINT8), SLE_CONDVAR(Vehicle, cargo_subtype, SLE_UINT8, 35, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 67), - SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), - SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), - SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), + SLEG_CONDVAR( _cargo_days, SLE_UINT8, 0, 68), + SLEG_CONDVAR( _cargo_source, SLE_FILE_U8 | SLE_VAR_U16, 0, 7), + SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 68), + SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 68), SLE_VAR(Vehicle, cargo_cap, SLE_UINT16), SLE_CONDVAR(Vehicle, refit_cap, SLE_UINT16, 182, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_count, SLE_UINT16, 0, 67), + SLEG_CONDVAR( _cargo_count, SLE_UINT16, 0, 68), SLE_CONDLST(Vehicle, cargo.packets, REF_CARGO_PACKET, 68, SL_MAX_VERSION), SLE_CONDARR(Vehicle, cargo.action_counts, SLE_UINT, VehicleCargoList::NUM_MOVE_TO_ACTION, 181, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, cargo_age_counter, SLE_UINT16, 162, SL_MAX_VERSION), @@ -640,13 +640,13 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, cur_implicit_order_index, SLE_UINT8), SLE_CONDVAR(Vehicle, cur_real_order_index, SLE_UINT8, 158, SL_MAX_VERSION), /* num_orders is now part of OrderList and is not saved but counted */ - SLE_CONDNULL(1, 0, 104), + SLE_CONDNULL(1, 0, 105), /* This next line is for version 4 and prior compatibility.. it temporarily reads type and flags (which were both 4 bits) into type. Later on this is converted correctly */ - SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, 0, 4), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, 0, 5), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), /* Orders for version 5 and on */ SLE_CONDVAR(Vehicle, current_order.type, SLE_UINT8, 5, SL_MAX_VERSION), @@ -655,7 +655,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) /* Refit in current order */ SLE_CONDVAR(Vehicle, current_order.refit_cargo, SLE_UINT8, 36, SL_MAX_VERSION), - SLE_CONDNULL(1, 36, 181), // refit_subtype + SLE_CONDNULL(1, 36, 182), // refit_subtype /* Timetable in current order */ SLE_CONDVAR(Vehicle, current_order.wait_time, SLE_UINT16, 67, SL_MAX_VERSION), @@ -663,17 +663,17 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_CONDVAR(Vehicle, current_order.max_speed, SLE_UINT16, 174, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, timetable_start, SLE_INT32, 129, SL_MAX_VERSION), - SLE_CONDREF(Vehicle, orders, REF_ORDER, 0, 104), + SLE_CONDREF(Vehicle, orders, REF_ORDER, 0, 105), SLE_CONDREF(Vehicle, orders, REF_ORDERLIST, 105, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, max_age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, max_age, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Vehicle, max_age, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Vehicle, date_of_last_service, SLE_INT32, 31, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 0, 30), - SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 31, 179), + SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 0, 31), + SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 31, 180), SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 180, SL_MAX_VERSION), SLE_VAR(Vehicle, reliability, SLE_UINT16), SLE_VAR(Vehicle, reliability_spd_dec, SLE_UINT16), @@ -681,37 +681,37 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, breakdown_delay, SLE_UINT8), SLE_VAR(Vehicle, breakdowns_since_last_service, SLE_UINT8), SLE_VAR(Vehicle, breakdown_chance, SLE_UINT8), - SLE_CONDVAR(Vehicle, build_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, build_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Vehicle, build_year, SLE_INT32, 31, SL_MAX_VERSION), SLE_VAR(Vehicle, load_unload_ticks, SLE_UINT16), SLEG_CONDVAR( _cargo_paid_for, SLE_UINT16, 45, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 40, 179), + SLE_CONDVAR(Vehicle, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 40, 180), SLE_CONDVAR(Vehicle, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, profit_this_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), + SLE_CONDVAR(Vehicle, profit_this_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 65), SLE_CONDVAR(Vehicle, profit_this_year, SLE_INT64, 65, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, profit_last_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), + SLE_CONDVAR(Vehicle, profit_last_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 65), SLE_CONDVAR(Vehicle, profit_last_year, SLE_INT64, 65, SL_MAX_VERSION), - SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_I32 | SLE_VAR_I64, 51, 64), - SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 67), - SLEG_CONDVAR( _cargo_loaded_at_xy, SLE_UINT32, 51, 67), - SLE_CONDVAR(Vehicle, value, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), + SLEG_CONDVAR( _cargo_feeder_share, SLE_FILE_I32 | SLE_VAR_I64, 51, 65), + SLEG_CONDVAR( _cargo_feeder_share, SLE_INT64, 65, 68), + SLEG_CONDVAR( _cargo_loaded_at_xy, SLE_UINT32, 51, 68), + SLE_CONDVAR(Vehicle, value, SLE_FILE_I32 | SLE_VAR_I64, 0, 65), SLE_CONDVAR(Vehicle, value, SLE_INT64, 65, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, random_bits, SLE_UINT8, 2, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, waiting_triggers, SLE_UINT8, 2, SL_MAX_VERSION), SLE_CONDREF(Vehicle, next_shared, REF_VEHICLE, 2, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 68), - SLE_CONDNULL(4, 69, 100), + SLE_CONDNULL(2, 2, 69), + SLE_CONDNULL(4, 69, 101), SLE_CONDVAR(Vehicle, group_id, SLE_UINT16, 60, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, current_order_time, SLE_UINT32, 67, SL_MAX_VERSION), SLE_CONDVAR(Vehicle, lateness_counter, SLE_INT32, 67, SL_MAX_VERSION), - SLE_CONDNULL(10, 2, 143), // old reserved space + SLE_CONDNULL(10, 2, 144), // old reserved space SLE_END() }; @@ -725,15 +725,15 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Train, railtype, SLE_UINT8), SLE_VAR(Train, track, SLE_UINT8), - SLE_CONDVAR(Train, flags, SLE_FILE_U8 | SLE_VAR_U16, 2, 99), + SLE_CONDVAR(Train, flags, SLE_FILE_U8 | SLE_VAR_U16, 2, 100), SLE_CONDVAR(Train, flags, SLE_UINT16, 100, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 59), + SLE_CONDNULL(2, 2, 60), SLE_CONDVAR(Train, wait_counter, SLE_UINT16, 136, SL_MAX_VERSION), - SLE_CONDNULL(2, 2, 19), + SLE_CONDNULL(2, 2, 20), SLE_CONDVAR(Train, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION), - SLE_CONDNULL(11, 2, 143), // old reserved space + SLE_CONDNULL(11, 2, 144), // old reserved space SLE_END() }; @@ -749,11 +749,11 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(RoadVehicle, crashed_ctr, SLE_UINT16), SLE_VAR(RoadVehicle, reverse_ctr, SLE_UINT8), - SLE_CONDNULL(2, 6, 68), + SLE_CONDNULL(2, 6, 69), SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, 139, SL_MAX_VERSION), - SLE_CONDNULL(4, 69, 130), - SLE_CONDNULL(2, 6, 130), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(4, 69, 131), + SLE_CONDNULL(2, 6, 131), + SLE_CONDNULL(16, 2, 144), // old reserved space SLE_END() }; @@ -765,7 +765,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_CONDDEQUE(Ship, path, SLE_UINT8, 203, SL_MAX_VERSION), SLE_CONDVAR(Ship, rotation, SLE_UINT8, 204, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, 2, 144), // old reserved space SLE_END() }; @@ -776,7 +776,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Aircraft, crashed_counter, SLE_UINT16), SLE_VAR(Aircraft, pos, SLE_UINT8), - SLE_CONDVAR(Aircraft, targetairport, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Aircraft, targetairport, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), SLE_CONDVAR(Aircraft, targetairport, SLE_UINT16, 5, SL_MAX_VERSION), SLE_VAR(Aircraft, state, SLE_UINT8), @@ -788,7 +788,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_CONDVAR(Aircraft, turn_counter, SLE_UINT8, 136, SL_MAX_VERSION), SLE_CONDVAR(Aircraft, flags, SLE_UINT8, 167, SL_MAX_VERSION), - SLE_CONDNULL(13, 2, 143), // old reserved space + SLE_CONDNULL(13, 2, 144), // old reserved space SLE_END() }; @@ -798,18 +798,18 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 164), SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), SLE_VAR(Vehicle, sprite_seq.seq[0].sprite, SLE_FILE_U16 | SLE_VAR_U32), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, 0, 59), SLE_VAR(Vehicle, progress, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), @@ -818,7 +818,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_CONDVAR(Vehicle, spritenum, SLE_UINT8, 2, SL_MAX_VERSION), - SLE_CONDNULL(15, 2, 143), // old reserved space + SLE_CONDNULL(15, 2, 144), // old reserved space SLE_END() }; @@ -829,37 +829,37 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_REF(Vehicle, next, REF_VEHICLE_OLD), SLE_VAR(Vehicle, subtype, SLE_UINT8), - SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(Vehicle, dest_tile, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(Vehicle, dest_tile, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, x_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLE_CONDVAR(Vehicle, x_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 5), + SLE_CONDVAR(Vehicle, y_pos, SLE_FILE_I16 | SLE_VAR_I32, 0, 6), SLE_CONDVAR(Vehicle, y_pos, SLE_INT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 163), + SLE_CONDVAR(Vehicle, z_pos, SLE_FILE_U8 | SLE_VAR_I32, 0, 164), SLE_CONDVAR(Vehicle, z_pos, SLE_INT32, 164, SL_MAX_VERSION), SLE_VAR(Vehicle, direction, SLE_UINT8), - SLE_CONDNULL(5, 0, 57), + SLE_CONDNULL(5, 0, 58), SLE_VAR(Vehicle, owner, SLE_UINT8), SLE_VAR(Vehicle, vehstatus, SLE_UINT8), - SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), + SLE_CONDVAR(Vehicle, current_order.dest, SLE_FILE_U8 | SLE_VAR_U16, 0, 5), SLE_CONDVAR(Vehicle, current_order.dest, SLE_UINT16, 5, SL_MAX_VERSION), SLE_VAR(Vehicle, sprite_seq.seq[0].sprite, SLE_FILE_U16 | SLE_VAR_U32), - SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30), + SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 31), SLE_CONDVAR(Vehicle, age, SLE_INT32, 31, SL_MAX_VERSION), SLE_VAR(Vehicle, tick_counter, SLE_UINT8), - SLE_CONDVAR(DisasterVehicle, image_override, SLE_FILE_U16 | SLE_VAR_U32, 0, 190), + SLE_CONDVAR(DisasterVehicle, image_override, SLE_FILE_U16 | SLE_VAR_U32, 0, 191), SLE_CONDVAR(DisasterVehicle, image_override, SLE_UINT32, 191, SL_MAX_VERSION), - SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_FILE_U16 | SLE_VAR_U32, 0, 190), + SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_FILE_U16 | SLE_VAR_U32, 0, 191), SLE_CONDVAR(DisasterVehicle, big_ufo_destroyer_target, SLE_UINT32, 191, SL_MAX_VERSION), SLE_CONDVAR(DisasterVehicle, flags, SLE_UINT8, 194, SL_MAX_VERSION), - SLE_CONDNULL(16, 2, 143), // old reserved space + SLE_CONDNULL(16, 2, 144), // old reserved space SLE_END() }; diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index 0f9396985..c525566b8 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -150,17 +150,17 @@ void MoveWaypointsToBaseStations() } static const SaveLoad _old_waypoint_desc[] = { - SLE_CONDVAR(OldWaypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 5), + SLE_CONDVAR(OldWaypoint, xy, SLE_FILE_U16 | SLE_VAR_U32, 0, 6), SLE_CONDVAR(OldWaypoint, xy, SLE_UINT32, 6, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, town_index, SLE_UINT16, 12, 121), + SLE_CONDVAR(OldWaypoint, town_index, SLE_UINT16, 12, 122), SLE_CONDREF(OldWaypoint, town, REF_TOWN, 122, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, town_cn, SLE_FILE_U8 | SLE_VAR_U16, 12, 88), + SLE_CONDVAR(OldWaypoint, town_cn, SLE_FILE_U8 | SLE_VAR_U16, 12, 89), SLE_CONDVAR(OldWaypoint, town_cn, SLE_UINT16, 89, SL_MAX_VERSION), - SLE_CONDVAR(OldWaypoint, string_id, SLE_STRINGID, 0, 83), + SLE_CONDVAR(OldWaypoint, string_id, SLE_STRINGID, 0, 84), SLE_CONDSTR(OldWaypoint, name, SLE_STR, 0, 84, SL_MAX_VERSION), SLE_VAR(OldWaypoint, delete_ctr, SLE_UINT8), - SLE_CONDVAR(OldWaypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 30), + SLE_CONDVAR(OldWaypoint, build_date, SLE_FILE_U16 | SLE_VAR_I32, 3, 31), SLE_CONDVAR(OldWaypoint, build_date, SLE_INT32, 31, SL_MAX_VERSION), SLE_CONDVAR(OldWaypoint, localidx, SLE_UINT8, 3, SL_MAX_VERSION), SLE_CONDVAR(OldWaypoint, grfid, SLE_UINT32, 17, SL_MAX_VERSION), |