aboutsummaryrefslogtreecommitdiff
path: root/engines/touche/saveload.cpp
diff options
context:
space:
mode:
authorGregory Montoir2006-11-10 20:48:52 +0000
committerGregory Montoir2006-11-10 20:48:52 +0000
commit4e8d042e5cbe6a01cf0f32c692d99e0644559c1a (patch)
treec5b2613ef705629f897869da31268fe20cc686f1 /engines/touche/saveload.cpp
parent195a46477f1f74caed31519d3c0a723b390c1e32 (diff)
downloadscummvm-rg350-4e8d042e5cbe6a01cf0f32c692d99e0644559c1a.tar.gz
scummvm-rg350-4e8d042e5cbe6a01cf0f32c692d99e0644559c1a.tar.bz2
scummvm-rg350-4e8d042e5cbe6a01cf0f32c692d99e0644559c1a.zip
new menu code
workaround a possible scripting bug in introduction screen svn-id: r24668
Diffstat (limited to 'engines/touche/saveload.cpp')
-rw-r--r--engines/touche/saveload.cpp13
1 files changed, 6 insertions, 7 deletions
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);