diff options
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/exec.h | 6 | ||||
-rw-r--r-- | engines/parallaction/exec_br.cpp | 5 | ||||
-rw-r--r-- | engines/parallaction/exec_ns.cpp | 5 |
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/parallaction/exec.h b/engines/parallaction/exec.h index 887d6be526..9ac343dc62 100644 --- a/engines/parallaction/exec.h +++ b/engines/parallaction/exec.h @@ -143,10 +143,6 @@ public: ~CommandExec_br(); }; - - - - class ProgramExec { protected: struct ParallactionStruct2 { @@ -157,6 +153,8 @@ protected: bool suspend; } _ctxt; + const char **_instructionNames; + OpcodeSet _opcodes; uint16 _modCounter; diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index ef671b1e0e..9376aa57ef 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -61,8 +61,6 @@ namespace Parallaction { #define INST_STOP 30 #define INST_ENDSCRIPT 31 - - #define SetOpcodeTable(x) table = &x; typedef Common::Functor0Mem<void, CommandExec_br> OpcodeV1; @@ -73,6 +71,8 @@ typedef Common::Functor0Mem<void, ProgramExec_br> OpcodeV2; #define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &ProgramExec_br::instOp_##op)) #define DECLARE_INSTRUCTION_OPCODE(op) void ProgramExec_br::instOp_##op() +extern const char *_instructionNamesRes_br[]; + void Parallaction_br::setupSubtitles(char *s, char *s2, int y) { debugC(5, kDebugExec, "setupSubtitles(%s, %s, %i)", s, s2, y); @@ -602,6 +602,7 @@ void ProgramExec_br::init() { } ProgramExec_br::ProgramExec_br(Parallaction_br *vm) : ProgramExec_ns(vm), _vm(vm) { + _instructionNames = _instructionNamesRes_br; } ProgramExec_br::~ProgramExec_br() { diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index e596f2e971..fee215289b 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -61,7 +61,7 @@ typedef Common::Functor0Mem<void, ProgramExec_ns> OpcodeV2; #define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &ProgramExec_ns::instOp_##op)) #define DECLARE_INSTRUCTION_OPCODE(op) void ProgramExec_ns::instOp_##op() - +extern const char *_instructionNamesRes_ns[]; DECLARE_INSTRUCTION_OPCODE(on) { @@ -394,7 +394,7 @@ void ProgramExec::runScripts(ProgramList::iterator first, ProgramList::iterator (*it)->_status = kProgramRunning; - debugC(9, kDebugExec, "Animation: %s, instruction: %i", a->_name, (*inst)->_index); //_instructionNamesRes[(*inst)->_index - 1]); + debugC(9, kDebugExec, "anim: %s, inst[%02i]: %s", a->_name, (*inst)->_index, _instructionNames[(*inst)->_index - 1]); _ctxt.inst = inst; _ctxt.anim = AnimationPtr(a); @@ -755,6 +755,7 @@ void ProgramExec_ns::init() { } ProgramExec_ns::ProgramExec_ns(Parallaction_ns *vm) : _vm(vm) { + _instructionNames = _instructionNamesRes_ns; } ProgramExec_ns::~ProgramExec_ns() { |