diff options
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index f44af2b1cd..83f65db81c 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -756,6 +756,22 @@ 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; +// 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. + // Copy some old data retval->gfx_state = s->gfx_state; retval->sound_mute = s->sound_mute; @@ -813,22 +829,6 @@ 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); - - // static VM/Kernel information: - assert(0 == retval->_kernel); - retval->_kernel = s->_kernel; -// 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. - // Copy breakpoint information from current game instance retval->have_bp = s->have_bp; retval->bp_list = s->bp_list; |