Update to 1.11.0-beta1

This commit is contained in:
dP
2021-01-23 17:31:11 +03:00
parent d3c06c25c8
commit 5e4506f493
1045 changed files with 23534 additions and 60345 deletions

View File

@@ -392,7 +392,7 @@ static bool FixTTOEngines()
for (uint i = 0; i < lengthof(_orig_ship_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_SHIP, i);
for (uint i = 0; i < lengthof(_orig_aircraft_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_AIRCRAFT, i);
Date aging_date = min(_date + DAYS_TILL_ORIGINAL_BASE_YEAR, ConvertYMDToDate(2050, 0, 1));
Date aging_date = std::min(_date + DAYS_TILL_ORIGINAL_BASE_YEAR, ConvertYMDToDate(2050, 0, 1));
for (EngineID i = 0; i < 256; i++) {
int oi = ttd_to_tto[i];
@@ -445,7 +445,7 @@ static bool FixTTOEngines()
e->preview_company = INVALID_COMPANY;
e->preview_asked = (CompanyMask)-1;
e->preview_wait = 0;
e->name = nullptr;
e->name = std::string{};
}
return true;
@@ -1153,7 +1153,7 @@ static const OldChunks vehicle_chunk[] = {
OCL_SVAR( OC_UINT8, Vehicle, owner ),
OCL_SVAR( OC_TILE, Vehicle, tile ),
OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Vehicle, sprite_seq.seq[0].sprite ),
OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Vehicle, sprite_cache.sprite_seq.seq[0].sprite ),
OCL_NULL( 8 ), ///< Vehicle sprite box, calculated automatically
@@ -1246,7 +1246,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
if (v == nullptr) continue;
v->refit_cap = v->cargo_cap;
SpriteID sprite = v->sprite_seq.seq[0].sprite;
SpriteID sprite = v->sprite_cache.sprite_seq.seq[0].sprite;
/* no need to override other sprites */
if (IsInsideMM(sprite, 1460, 1465)) {
sprite += 580; // aircraft smoke puff
@@ -1257,7 +1257,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
} else if (IsInsideMM(sprite, 2516, 2539)) {
sprite += 1385; // rotor or disaster-related vehicles
}
v->sprite_seq.seq[0].sprite = sprite;
v->sprite_cache.sprite_seq.seq[0].sprite = sprite;
switch (v->type) {
case VEH_TRAIN: {
@@ -1823,7 +1823,7 @@ bool LoadTTOMain(LoadgameState *ls)
* "increase them to compensate for the faster time advance in TTD compared to TTO
* which otherwise would cause much less income while the annual running costs of
* the vehicles stay the same" */
_economy.inflation_payment = min(_economy.inflation_payment * 124 / 74, MAX_INFLATION);
_economy.inflation_payment = std::min(_economy.inflation_payment * 124 / 74, MAX_INFLATION);
DEBUG(oldloader, 3, "Finished converting game data");
DEBUG(oldloader, 1, "TTO savegame successfully converted");