diff options
| author | Martin Kiewitz | 2016-02-21 20:32:42 +0100 |
|---|---|---|
| committer | Martin Kiewitz | 2016-02-21 20:33:17 +0100 |
| commit | 1ac8533b1f60d5695fb7095d7da9157689bdef6e (patch) | |
| tree | 2db4398ef43d15cf476c90000a0948d41a767931 /engines/sci/engine | |
| parent | b6b2bcf6071637d8210d124a7d8090969ba045d1 (diff) | |
| download | scummvm-rg350-1ac8533b1f60d5695fb7095d7da9157689bdef6e.tar.gz scummvm-rg350-1ac8533b1f60d5695fb7095d7da9157689bdef6e.tar.bz2 scummvm-rg350-1ac8533b1f60d5695fb7095d7da9157689bdef6e.zip | |
SCI32: Fix save patching for ScummVM dialog
- Patch game super object for saving instead of game object
- Remove re-adding planes+screen items, game::replay does that
We would only have to do that for soft-failing on restore
- Change debug levels of kNumLoops/kNumCels to 9
- Add special comment about -info- selector in syncWithScripts()
This should now make ScummVM menu saving work properly at
least in SQ6.
Diffstat (limited to 'engines/sci/engine')
| -rw-r--r-- | engines/sci/engine/kgraphics.cpp | 4 | ||||
| -rw-r--r-- | engines/sci/engine/savegame.cpp | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 0b945c1eec..91d241fb79 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -492,7 +492,7 @@ reg_t kNumLoops(EngineState *s, int argc, reg_t *argv) { loopCount = g_sci->_gfxCache->kernelViewGetLoopCount(viewId); - debugC(kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount); + debugC(9, kDebugLevelGraphics, "NumLoops(view.%d) = %d", viewId, loopCount); return make_reg(0, loopCount); } @@ -505,7 +505,7 @@ reg_t kNumCels(EngineState *s, int argc, reg_t *argv) { celCount = g_sci->_gfxCache->kernelViewGetCelCount(viewId, loopNo); - debugC(kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount); + debugC(9, kDebugLevelGraphics, "NumCels(view.%d, %d) = %d", viewId, loopNo, celCount); return make_reg(0, celCount); } diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 1b56e667bf..851e4fc07e 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -1096,11 +1096,12 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { if (g_sci->_gfxPorts) g_sci->_gfxPorts->saveLoadWithSerializer(ser); -#ifdef ENABLE_SCI32 - // Add current planes/screen elements of freshly loaded VM, only when our ScummVM dialogs are patched in - if (getSciVersion() >= SCI_VERSION_2) - g_sci->_gfxFrameout->syncWithScripts(true); -#endif + // SCI32: + // Current planes/screen elements of freshly loaded VM are re-added by scripts in [gameID]::replay + // We don't have to do that in here. + // But we may have to do it ourselves in case we ever implement some soft-error handling in case + // a saved game can't be restored. That way we can restore the game screen. + // see _gfxFrameout->syncWithScripts() Vocabulary *voc = g_sci->getVocabulary(); if (ser.getVersion() >= 30 && voc) |
