From d4999255b7e66cd263a203c140d4372568837c6f Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Tue, 31 Jul 2007 21:17:15 +0000 Subject: fix for bug #1751226 (glitches on save/load svn-id: r28370 --- engines/touche/saveload.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/touche/saveload.cpp') 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]); } -- cgit v1.2.3