mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
SCI: Removed the restoring parameter of the run_vm() function
svn-id: r51076
This commit is contained in:
parent
e7abc6da4f
commit
d53e5fbfb7
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user