aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Montoir2007-07-31 21:17:15 +0000
committerGregory Montoir2007-07-31 21:17:15 +0000
commitd4999255b7e66cd263a203c140d4372568837c6f (patch)
tree46ed5423629de70d841fed374b125887dae41245
parent6b3c03317d236da2c8d13754d59a8a9bd9ae851b (diff)
downloadscummvm-rg350-d4999255b7e66cd263a203c140d4372568837c6f.tar.gz
scummvm-rg350-d4999255b7e66cd263a203c140d4372568837c6f.tar.bz2
scummvm-rg350-d4999255b7e66cd263a203c140d4372568837c6f.zip
fix for bug #1751226 (glitches on save/load
svn-id: r28370
-rw-r--r--engines/touche/saveload.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp
index 653c2d26a3..fb82e68944 100644
--- a/engines/touche/saveload.cpp
+++ b/engines/touche/saveload.cpp
@@ -280,8 +280,8 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
_newMusicNum = stream->readUint16LE();
_currentRoomNum = stream->readUint16LE();
res_loadRoom(_currentRoomNum);
- int16 roomOffsX = stream->readUint16LE();
- int16 roomOffsY = stream->readUint16LE();
+ int16 roomOffsX = _flagsTable[614] = stream->readUint16LE();
+ int16 roomOffsY = _flagsTable[615] = stream->readUint16LE();
_disabledInputCounter = stream->readUint16LE();
res_loadProgram(_currentEpisodeNum);
setupEpisode(-1);
@@ -291,7 +291,7 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
saveOrLoadCommonArray(*stream, _programWalkTable);
saveOrLoadCommonArray(*stream, _programPointsTable);
stream->read(_updatedRoomAreasTable, 200);
- for (uint i = 1; i <= _updatedRoomAreasTable[0]; ++i) {
+ for (uint i = 1; i < _updatedRoomAreasTable[0]; ++i) {
updateRoomAreas(_updatedRoomAreasTable[i], -1);
}
saveOrLoadStaticArray(*stream, _sequenceEntryTable, NUM_SEQUENCES);
@@ -327,7 +327,9 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
Graphics::copyRect(_offscreenBuffer, kScreenWidth, 0, 0,
_backdropBuffer, _currentBitmapWidth, _flagsTable[614], _flagsTable[615],
kScreenWidth, kRoomHeight);
+ updateRoomRegions();
updateEntireScreen();
+ _roomNeedRedraw = false;
if (_flagsTable[617] != 0) {
res_loadSpeech(_flagsTable[617]);
}