SCI: Removed the restoring parameter of the run_vm() function

svn-id: r51076
This commit is contained in:
Filippos Karapetis 2010-07-20 23:15:07 +00:00
parent e7abc6da4f
commit d53e5fbfb7
5 changed files with 7 additions and 7 deletions

View File

@ -2662,7 +2662,7 @@ bool Console::cmdSend(int argc, const char **argv) {
// We call run_engine explictly so we can restore the value of r_acc
// after execution.
run_vm(_engine->_gamestate, 0);
run_vm(_engine->_gamestate);
}

View File

@ -238,7 +238,7 @@ void invokeSelector(EngineState *s, reg_t object, int selectorId,
xstack->sp += argc + 2;
xstack->fp += argc + 2;
run_vm(s, false); // Start a new vm
run_vm(s); // Start a new vm
}
SelectorType lookupSelector(SegManager *segMan, reg_t obj_location, Selector selectorId, ObjVarRef *varp, reg_t *fptr) {

View File

@ -1053,7 +1053,7 @@ int readPMachineInstruction(const byte *src, byte &extOpcode, int16 opparams[4])
return offset;
}
void run_vm(EngineState *s, bool restoring) {
void run_vm(EngineState *s) {
assert(s);
int temp;
@ -1074,7 +1074,8 @@ void run_vm(EngineState *s, bool restoring) {
if (!local_script)
error("run_vm(): program counter gone astray (local_script pointer is null)");
if (!restoring)
// TODO: Revise this
if (s->abortScriptProcessing != kAbortLoadGame)
s->executionStackBase = s->_executionStack.size() - 1;
s->variablesSegment[VAR_TEMP] = s->variablesSegment[VAR_PARAM] = s->_segMan->findSegmentByType(SEG_TYPE_STACK);

View File

@ -315,9 +315,8 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj,
* It executes the code on s->heap[pc] until it hits a 'ret' operation
* while (stack_base == stack_pos). Requires s to be set up correctly.
* @param[in] s The state to use
* @param[in] restoring true if s has just been restored, false otherwise
*/
void run_vm(EngineState *s, bool restoring);
void run_vm(EngineState *s);
/**
* Debugger functionality

View File

@ -410,7 +410,7 @@ void SciEngine::runGame() {
do {
_gamestate->_executionStackPosChanged = false;
run_vm(_gamestate, (_gamestate->abortScriptProcessing == kAbortLoadGame));
run_vm(_gamestate);
exitGame();
if (_gamestate->abortScriptProcessing == kAbortRestartGame) {