aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-07-26 04:03:11 +0000
committerTravis Howell2004-07-26 04:03:11 +0000
commit3a8f518b02e01580d292a6a65a71e1a0f7baa94a (patch)
tree91ffdf7d449f8b6a28827c8d8f47f6460a4a5f02 /scumm
parent54b813c4a61d2226b044a3261d3f11d8dce2f4ea (diff)
downloadscummvm-rg350-3a8f518b02e01580d292a6a65a71e1a0f7baa94a.tar.gz
scummvm-rg350-3a8f518b02e01580d292a6a65a71e1a0f7baa94a.tar.bz2
scummvm-rg350-3a8f518b02e01580d292a6a65a71e1a0f7baa94a.zip
VAR_ROOM_FLAG should always be set after load of saved game.
Other VAR_ROOM_FLAG setting in scumm5 specific. svn-id: r14332
Diffstat (limited to 'scumm')
-rw-r--r--scumm/resource.cpp2
-rw-r--r--scumm/saveload.cpp27
2 files changed, 16 insertions, 13 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 697bf30308..e5e7ed9c22 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -625,7 +625,7 @@ void ScummEngine::ensureResourceLoaded(int type, int i) {
loadResource(type, i);
- if (VAR_ROOM_FLAG != 0xFF)
+ if (_version == 5)
if (type == rtRoom && i == _roomResource)
VAR(VAR_ROOM_FLAG) = 1;
}
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 6f433239ff..ce631b40d4 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -228,9 +228,14 @@ bool ScummEngine::loadState(int slot, bool compat) {
_scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
}
- // Sync with current config setting
- if (_version >= 7)
- VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+ // With version 22, we replaced the scale items with scale slots. So when
+ // loading such an old save game, try to upgrade the old to new format.
+ if (hdr.ver < VER(22)) {
+ // Convert all rtScaleTable resources to matching scale items
+ for (i = 1; i < res.num[rtScaleTable]; i++) {
+ convertScaleTableToScaleSlot(i);
+ }
+ }
// We could simply dirty colours 0-15 for 16-colour games -- nowadays
// they handle their palette pretty much like the more recent games
@@ -290,15 +295,6 @@ bool ScummEngine::loadState(int slot, bool compat) {
// Reset charset mask
_charset->_hasMask = false;
- // With version 22, we replaced the scale items with scale slots. So when
- // loading such an old save game, try to upgrade the old to new format.
- if (hdr.ver < VER(22)) {
- // Convert all rtScaleTable resources to matching scale items
- for (i = 1; i < res.num[rtScaleTable]; i++) {
- convertScaleTableToScaleSlot(i);
- }
- }
-
_lastCodePtr = NULL;
_drawObjectQueNr = 0;
_verbMouseOver = 0;
@@ -307,6 +303,13 @@ bool ScummEngine::loadState(int slot, bool compat) {
initBGBuffers(_roomHeight);
+ if (VAR_ROOM_FLAG != 0xFF)
+ VAR(VAR_ROOM_FLAG) = 1;
+
+ // Sync with current config setting
+ if (_version >= 7)
+ VAR(VAR_VOICE_MODE) = ConfMan.getBool("subtitles");
+
CHECK_HEAP
debug(1, "State loaded from '%s'", filename);