Cleanup
svn-id: r49521
This commit is contained in:
parent
6474eaa1b2
commit
eafc63e572
3 changed files with 16 additions and 21 deletions
|
@ -856,9 +856,6 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
|
|||
s->_sound.sfx_exit();
|
||||
#endif
|
||||
|
||||
// Set exec stack base to zero
|
||||
s->execution_stack_base = 0;
|
||||
|
||||
// Now copy all current state information
|
||||
|
||||
#ifdef USE_OLD_MUSIC_FUNCTIONS
|
||||
|
|
|
@ -91,20 +91,22 @@ void EngineState::reset(bool isRestoring) {
|
|||
_memorySegmentSize = 0;
|
||||
_soundCmd = 0;
|
||||
|
||||
execution_stack_base = 0;
|
||||
_executionStackPosChanged = false;
|
||||
|
||||
_fileHandles.resize(5);
|
||||
|
||||
r_acc = NULL_REG;
|
||||
restAdjust = 0;
|
||||
r_prev = NULL_REG;
|
||||
|
||||
stack_base = 0;
|
||||
stack_top = 0;
|
||||
abortScriptProcessing = kAbortNone;
|
||||
}
|
||||
|
||||
execution_stack_base = 0;
|
||||
_executionStackPosChanged = false;
|
||||
|
||||
restAdjust = 0;
|
||||
restAdjustCur = 0;
|
||||
|
||||
r_acc = NULL_REG;
|
||||
r_prev = NULL_REG;
|
||||
|
||||
last_wait_time = 0;
|
||||
|
||||
gc_countdown = 0;
|
||||
|
|
|
@ -1713,7 +1713,6 @@ void game_run(EngineState **_s) {
|
|||
|
||||
if (s->abortScriptProcessing == kAbortRestartGame) {
|
||||
s->abortScriptProcessing = kAbortNone;
|
||||
s->_executionStack.clear();
|
||||
s->_executionStackPosChanged = false;
|
||||
|
||||
script_init_engine(s);
|
||||
|
@ -1726,16 +1725,13 @@ void game_run(EngineState **_s) {
|
|||
send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
|
||||
|
||||
s->gameWasRestarted = true;
|
||||
|
||||
} else {
|
||||
if (s->abortScriptProcessing == kAbortLoadGame) {
|
||||
} else if (s->abortScriptProcessing == kAbortLoadGame) {
|
||||
s->abortScriptProcessing = kAbortNone;
|
||||
debugC(2, kDebugLevelVM, "Restarting with replay()");
|
||||
s->_executionStack.clear();
|
||||
// Restart with replay
|
||||
_init_stack_base_with_selector(s, g_sci->getKernel()->_selectorCache.replay);
|
||||
send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base);
|
||||
} else
|
||||
} else {
|
||||
break; // exit loop
|
||||
}
|
||||
} while (true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue