LASTEXPRESS: Remove use of skip from savegame functions when loading
We cannot accurately skip over compressed data as it is not know before decoding how much data will be used
This commit is contained in:
parent
eb6c60cec0
commit
7f05e1413c
3 changed files with 25 additions and 3 deletions
|
@ -372,7 +372,15 @@ void SoundQueue::saveLoadWithSerializer(Common::Serializer &s) {
|
|||
(*i)->saveLoadWithSerializer(s);
|
||||
} else {
|
||||
warning("[Sound::saveLoadWithSerializer] Loading not implemented");
|
||||
s.skip(numEntries * 64);
|
||||
|
||||
uint32 unusedDataSize = numEntries * 64;
|
||||
if (s.isLoading()) {
|
||||
byte *empty = (byte *)malloc(unusedDataSize);
|
||||
s.syncBytes(empty, unusedDataSize);
|
||||
free(empty);
|
||||
} else {
|
||||
s.skip(unusedDataSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue