[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.116,1.117
Max Horn
fingolfin at users.sourceforge.net
Wed Jun 25 13:17:17 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.164,2.165
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.129,1.130 object.cpp,1.127,1.128 resource.cpp,1.98,1.99 script.cpp,1.117,1.118 scumm.h,1.258,1.259 scummvm.cpp,2.253,2.254 sound.cpp,1.143,1.144 sound.h,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9851
Modified Files:
script.cpp
Log Message:
cleanup
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- script.cpp 16 Jun 2003 11:37:08 -0000 1.116
+++ script.cpp 25 Jun 2003 20:16:47 -0000 1.117
@@ -323,26 +323,29 @@
nest->number = 0xFF;
nest->where = 0xFF;
} else {
+ // Store information about the currently running script
slot = &vm.slot[_currentScript];
nest->number = slot->number;
nest->where = slot->where;
nest->slot = _currentScript;
}
- if (++_numNestedScripts > ARRAYSIZE(vm.nest))
+ _numNestedScripts++;
+
+ if (_numNestedScripts > ARRAYSIZE(vm.nest))
error("Too many nested scripts");
_currentScript = script;
-
getScriptBaseAddress();
getScriptEntryPoint();
executeScript();
_numNestedScripts--;
- nest = &vm.nest[_numNestedScripts];
-
if (nest->number != 0xFF) {
+ // Try to resume the script which called us, if its status has not changed
+ // since it invoked us. In particular, we only resume it if it hasn't been
+ // stopped in the meantime, and if it did not already move on.
slot = &vm.slot[nest->slot];
if (slot->number == nest->number && slot->where == nest->where &&
slot->status != ssDead && slot->freezeCount == 0) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.164,2.165
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.129,1.130 object.cpp,1.127,1.128 resource.cpp,1.98,1.99 script.cpp,1.117,1.118 scumm.h,1.258,1.259 scummvm.cpp,2.253,2.254 sound.cpp,1.143,1.144 sound.h,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list