From 4e8d042e5cbe6a01cf0f32c692d99e0644559c1a Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 10 Nov 2006 20:48:52 +0000 Subject: new menu code workaround a possible scripting bug in introduction screen svn-id: r24668 --- engines/touche/saveload.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'engines/touche/saveload.cpp') diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp index 4e9e6844c3..1c13bcfe36 100644 --- a/engines/touche/saveload.cpp +++ b/engines/touche/saveload.cpp @@ -267,13 +267,12 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) { clearAreaTable(); _flagsTable[115] = 0; clearRoomArea(); - int16 room_offs_x, room_offs_y; _currentEpisodeNum = stream->readUint16LE(); _newMusicNum = stream->readUint16LE(); _currentRoomNum = stream->readUint16LE(); res_loadRoom(_currentRoomNum); - room_offs_x = stream->readUint16LE(); - room_offs_y = stream->readUint16LE(); + int16 roomOffsX = stream->readUint16LE(); + int16 roomOffsY = stream->readUint16LE(); _disabledInputCounter = stream->readUint16LE(); res_loadProgram(_currentEpisodeNum); setupEpisode(-1); @@ -322,9 +321,9 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) { } _talkListEnd = stream->readUint16LE(); _talkListCurrent = stream->readUint16LE(); - _flagsTable[614] = room_offs_x; - _flagsTable[615] = room_offs_y; - for (uint i = 0; i < 6; ++i) { + _flagsTable[614] = roomOffsX; + _flagsTable[615] = roomOffsY; + for (uint i = 0; i < NUM_SEQUENCES; ++i) { if (_sequenceEntryTable[i].seqNum != -1) { res_loadSequence(_sequenceEntryTable[i].seqNum, i); } @@ -377,7 +376,7 @@ bool ToucheEngine::loadGameState(int num) { if (f) { uint16 version = f->readUint16LE(); if (version < kCurrentGameStateVersion) { - warning("Unsupported gamestate version %d\n", version); + warning("Unsupported gamestate version %d (index %d)", version, num); } else { f->skip(2 + kGameStateDescriptionLen); loadGameStateData(f); -- cgit v1.2.3