aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-07-08 10:44:25 +0000
committerFilippos Karapetis2009-07-08 10:44:25 +0000
commitd351c7b9cb6cb46da9bb141c9ca90aba021c1602 (patch)
treefb172777290e39d89009289ee91f185e1fc3158c /engines/sci
parenta764f274f83b72c4fafa5ad1c72127462c7c9410 (diff)
downloadscummvm-rg350-d351c7b9cb6cb46da9bb141c9ca90aba021c1602.tar.gz
scummvm-rg350-d351c7b9cb6cb46da9bb141c9ca90aba021c1602.tar.bz2
scummvm-rg350-d351c7b9cb6cb46da9bb141c9ca90aba021c1602.zip
Only the kernel needs to be initialized before anything else, when saving/loading
svn-id: r42262
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/savegame.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 83f65db81c..e167e7eca8 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -756,18 +756,9 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// FIXME: Do in-place loading at some point, instead of creating a new EngineState instance from scratch.
retval = new EngineState(s->resmgr, s->_version, s->_flags);
- // static parser information:
- assert(0 == retval->_vocabulary);
- retval->_vocabulary = s->_vocabulary;
-// s->_vocabulary = 0; // FIXME: We should set s->_vocabulary to 0 here,
-// else it could be freed when the old EngineState is freed. Luckily, this freeing currently
-// never happens, so we don't need to.
-
- retval->parser_base = make_reg(s->sys_strings_segment, SYS_STRING_PARSER_BASE);
-
// static VM/Kernel information:
assert(0 == retval->_kernel);
- retval->_kernel = s->_kernel;
+ retval->_kernel = s->_kernel; // needs to be initialized before _reset_graphics_input is called
// s->_kernel = 0; // FIXME: We should set s->_kernel to 0 here,
// else it could be freed when the old EngineState is freed. Luckily, this freeing currently
// never happens, so we don't need to.
@@ -829,6 +820,15 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
retval->last_wait_time = g_system->getMillis();
retval->game_start_time = g_system->getMillis() - retval->game_time * 1000;
+ // static parser information:
+ assert(0 == retval->_vocabulary);
+ retval->_vocabulary = s->_vocabulary;
+// s->_vocabulary = 0; // FIXME: We should set s->_vocabulary to 0 here,
+// else it could be freed when the old EngineState is freed. Luckily, this freeing currently
+// never happens, so we don't need to.
+
+ retval->parser_base = make_reg(s->sys_strings_segment, SYS_STRING_PARSER_BASE);
+
// Copy breakpoint information from current game instance
retval->have_bp = s->have_bp;
retval->bp_list = s->bp_list;