[Scummvm-cvs-logs] SF.net SVN: scummvm:[51076] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jul 21 01:15:08 CEST 2010


Revision: 51076
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51076&view=rev
Author:   thebluegr
Date:     2010-07-20 23:15:07 +0000 (Tue, 20 Jul 2010)

Log Message:
-----------
SCI: Removed the restoring parameter of the run_vm() function

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/selector.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/engine/vm.h
    scummvm/trunk/engines/sci/sci.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-07-20 21:53:58 UTC (rev 51075)
+++ scummvm/trunk/engines/sci/console.cpp	2010-07-20 23:15:07 UTC (rev 51076)
@@ -2662,7 +2662,7 @@
 
 		// 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);
 
 	}
 

Modified: scummvm/trunk/engines/sci/engine/selector.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/selector.cpp	2010-07-20 21:53:58 UTC (rev 51075)
+++ scummvm/trunk/engines/sci/engine/selector.cpp	2010-07-20 23:15:07 UTC (rev 51076)
@@ -238,7 +238,7 @@
 	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) {

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 21:53:58 UTC (rev 51075)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 23:15:07 UTC (rev 51076)
@@ -1053,7 +1053,7 @@
 	return offset;
 }
 
-void run_vm(EngineState *s, bool restoring) {
+void run_vm(EngineState *s) {
 	assert(s);
 
 	int temp;
@@ -1074,7 +1074,8 @@
 	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);

Modified: scummvm/trunk/engines/sci/engine/vm.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.h	2010-07-20 21:53:58 UTC (rev 51075)
+++ scummvm/trunk/engines/sci/engine/vm.h	2010-07-20 23:15:07 UTC (rev 51076)
@@ -315,9 +315,8 @@
  * 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

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2010-07-20 21:53:58 UTC (rev 51075)
+++ scummvm/trunk/engines/sci/sci.cpp	2010-07-20 23:15:07 UTC (rev 51076)
@@ -410,7 +410,7 @@
 
 	do {
 		_gamestate->_executionStackPosChanged = false;
-		run_vm(_gamestate, (_gamestate->abortScriptProcessing == kAbortLoadGame));
+		run_vm(_gamestate);
 		exitGame();
 
 		if (_gamestate->abortScriptProcessing == kAbortRestartGame) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list