diff options
Diffstat (limited to 'scumm/script.cpp')
-rw-r--r-- | scumm/script.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 239acf4e86..534d34074e 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -889,17 +889,13 @@ void ScummEngine::runAllScripts() { for (i = 0; i < NUM_SCRIPT_SLOT; i++) vm.slot[i].didexec = 0; - // FIXME - why is _curExecScript?!? The only place it is ever set is here. - // The outer world will only see it as consequence of the calls made in the following - // for loop. But in that case, _curExecScript will be equal to _currentScript. Hence - // it would seem we can replace all occurances of _curExecScript by _currentScript. _currentScript = 0xFF; int numCycles = (_heversion >= 90) ? VAR(VAR_NUM_SCRIPT_CYCLES) : 1; for (int cycle = 1; cycle <= numCycles; cycle++) { - for (_curExecScript = 0; _curExecScript < NUM_SCRIPT_SLOT; _curExecScript++) { - if (vm.slot[_curExecScript].cycle == cycle && vm.slot[_curExecScript].status == ssRunning && vm.slot[_curExecScript].didexec == 0) { - _currentScript = (byte)_curExecScript; + for (i = 0; i < NUM_SCRIPT_SLOT; i++) { + if (vm.slot[i].cycle == cycle && vm.slot[i].status == ssRunning && vm.slot[i].didexec == 0) { + _currentScript = (byte)i; getScriptBaseAddress(); getScriptEntryPoint(); executeScript(); |