Initial support for loading savegames from SpringPP v2.0.102/103

Savegame version 220

Bin all extra settings added in SpringPP.
Bin extra features: trip histories, more conditional orders/jump counter,
prev order time, snow-line chunk, town auto adv. campaign, etc.
Fix vehicle flags.
Fix bridges wrt height changes.
Handle 60-bit RIFF chunk sizes.
Doesn't deal with huge airports, loading games with these may
lead to undefined ehaviour.
PAX signals and traffic lights are ignored.
This commit is contained in:
Jonathan G Rennison
2015-07-31 17:34:57 +01:00
parent bd10b0fb0b
commit 39608841f2
9 changed files with 246 additions and 6 deletions

View File

@@ -1695,6 +1695,12 @@ static void SlLoadChunk(const ChunkHandler *ch)
/* Read length */
len = (SlReadByte() << 16) | ((m >> 4) << 24);
len += SlReadUint16();
if (SlXvIsFeaturePresent(XSLFI_RIFF_HEADER_60_BIT)) {
if (len != 0) {
SlErrorCorrupt("RIFF chunk too large");
}
len = SlReadUint32();
}
_sl.obj_len = len;
endoffs = _sl.reader->GetSize() + len;
ch->load_proc();
@@ -1741,6 +1747,12 @@ static void SlLoadCheckChunk(const ChunkHandler *ch)
/* Read length */
len = (SlReadByte() << 16) | ((m >> 4) << 24);
len += SlReadUint16();
if (SlXvIsFeaturePresent(XSLFI_RIFF_HEADER_60_BIT)) {
if (len != 0) {
SlErrorCorrupt("RIFF chunk too large");
}
len = SlReadUint32();
}
_sl.obj_len = len;
endoffs = _sl.reader->GetSize() + len;
if (ch && ch->load_check_proc) {