From c22784449f4cb3a54b37beb2d6660ae89ffe7bfb Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 15 Sep 2007 12:16:43 +0000 Subject: Fixed BRA parser table for scripts. svn-id: r28905 --- engines/parallaction/exec_br.cpp | 19 +++++++++++++------ engines/parallaction/exec_ns.cpp | 6 +++--- engines/parallaction/parallaction.h | 2 +- engines/parallaction/parser_br.cpp | 2 ++ engines/parallaction/parser_ns.cpp | 2 +- engines/parallaction/staticres.cpp | 2 ++ 6 files changed, 22 insertions(+), 11 deletions(-) (limited to 'engines') diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index c79608131b..21064d30f4 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -29,12 +29,13 @@ namespace Parallaction { #define INST_TEXT 23 #define INST_MUL 24 #define INST_DIV 25 -#define INST_IF 26 -#define INST_IFEQ 27 -#define INST_IFLT 28 -#define INST_IFGT 29 -#define INST_ENDIF 30 -#define INST_STOP 31 +#define INST_IFEQ 26 +#define INST_IFLT 27 +#define INST_IFGT 28 +#define INST_ENDIF 29 +#define INST_STOP 30 +#define INST_ENDSCRIPT 31 + typedef OpcodeImpl OpcodeV2; @@ -411,12 +412,18 @@ void Parallaction_br::jobEraseSubtitle(void *parm, Job *job) { if (_subtitle0._old.x != -1000) { _subtitle0.getRect(r); + +// printf("sub0: (%i, %i, %i, %i)\n", r.left, r.top, r.right, r.bottom); + _gfx->restoreBackground(r); } _subtitle0._old = _subtitle0._pos; if (_subtitle1._old.x != -1000) { _subtitle0.getRect(r); + +// printf("sub1: (%i, %i, %i, %i)\n", r.left, r.top, r.right, r.bottom); + _gfx->restoreBackground(r); } _subtitle1._old = _subtitle1._pos; diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index d7500be7f1..7bf9c69332 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -48,7 +48,7 @@ namespace Parallaction { #define INST_START 16 #define INST_SOUND 17 #define INST_MOVE 18 -#define INST_END 19 +#define INST_ENDSCRIPT 19 typedef OpcodeImpl OpcodeV1; @@ -185,7 +185,7 @@ DECLARE_INSTRUCTION_OPCODE(move) { _engineFlags |= kEngineWalking; } -DECLARE_INSTRUCTION_OPCODE(end) { +DECLARE_INSTRUCTION_OPCODE(endscript) { if ((_instRunCtxt.a->_flags & kFlagsLooping) == 0) { _instRunCtxt.a->_flags &= ~kFlagsActing; runCommands(_instRunCtxt.a->_commands, _instRunCtxt.a); @@ -819,7 +819,7 @@ void Parallaction_ns::initOpcodes() { INSTRUCTION_OPCODE(start), INSTRUCTION_OPCODE(sound), INSTRUCTION_OPCODE(move), - INSTRUCTION_OPCODE(end) + INSTRUCTION_OPCODE(endscript) }; uint i; diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 4d4f685eca..2c04bd4430 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -884,7 +884,7 @@ protected: DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(start); DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(sound); DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(move); - DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(end); + DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(endscript); }; diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index dac6a13a66..673d3ed8f2 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -704,6 +704,8 @@ void Parallaction_br::initParsers() { INSTRUCTION_PARSER(inc), // mul INSTRUCTION_PARSER(inc), // div INSTRUCTION_PARSER(if_op), + INSTRUCTION_PARSER(null), + INSTRUCTION_PARSER(null), INSTRUCTION_PARSER(endif), INSTRUCTION_PARSER(zone), // stop INSTRUCTION_PARSER(endscript) diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index a5c72987fb..8332f05dc7 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -871,7 +871,7 @@ void Parallaction_ns::parseLocation(const char *filename) { debugC(5, kDebugLocation, "parseLocation('%s')", filename); allocateLocationSlot(filename); - printf("got location slot #%i for %s\n", _currentLocationIndex, filename); +// printf("got location slot #%i for %s\n", _currentLocationIndex, filename); Script *script = _disk->loadLocation(filename); diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp index b126d1dc0c..94d2692ff1 100644 --- a/engines/parallaction/staticres.cpp +++ b/engines/parallaction/staticres.cpp @@ -421,6 +421,8 @@ const char *_instructionNamesRes_br[] = { "mul", "div", "if", + "dummy", + "dummy", "endif", "stop", "endscript" -- cgit v1.2.3