aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/exec.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-23 11:38:09 +0000
committerNicola Mettifogo2009-03-23 11:38:09 +0000
commitd18274d0ee2bf8effcb36b726fc833503f7924aa (patch)
tree33eb6cd429e8d86e0f923370661765f30086f55d /engines/parallaction/exec.cpp
parentca993d8b00e54c8523b5b9e708c94d3fc871e6db (diff)
downloadscummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.tar.gz
scummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.tar.bz2
scummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.zip
Implemented all variants of IF script instruction. Program class has been changed to store an Array of instruction instead of a List, so that references to instructions are integers.
svn-id: r39631
Diffstat (limited to 'engines/parallaction/exec.cpp')
-rw-r--r--engines/parallaction/exec.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/parallaction/exec.cpp b/engines/parallaction/exec.cpp
index 7a4208e3c3..0d5215cd9a 100644
--- a/engines/parallaction/exec.cpp
+++ b/engines/parallaction/exec.cpp
@@ -37,18 +37,18 @@ void ProgramExec::runScript(ProgramPtr script, AnimationPtr a) {
_ctxt._suspend = false;
_ctxt._modCounter = _modCounter;
- InstructionList::iterator inst;
+ InstructionPtr inst;
for ( ; (a->_flags & kFlagsActing) ; ) {
- inst = _ctxt._ip;
+ inst = script->_instructions[_ctxt._ip];
_ctxt._inst = inst;
++_ctxt._ip;
- debugC(9, kDebugExec, "inst [%02i] %s\n", (*inst)->_index, _instructionNames[(*inst)->_index - 1]);
+ debugC(9, kDebugExec, "inst [%02i] %s\n", inst->_index, _instructionNames[inst->_index - 1]);
script->_status = kProgramRunning;
- (*_opcodes[(*inst)->_index])(_ctxt);
+ (*_opcodes[inst->_index])(_ctxt);
if (_ctxt._suspend)
break;