diff options
author | Nicola Mettifogo | 2008-02-05 09:30:58 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-02-05 09:30:58 +0000 |
commit | 265621de5899b149cfb1a5a39ce823371d11b749 (patch) | |
tree | 9a3f3dbea823c9c66c3c228ec4c9469241494e9a /engines | |
parent | 50ff4a46037ffe5b21d63556071ade0168c865ba (diff) | |
download | scummvm-rg350-265621de5899b149cfb1a5a39ce823371d11b749.tar.gz scummvm-rg350-265621de5899b149cfb1a5a39ce823371d11b749.tar.bz2 scummvm-rg350-265621de5899b149cfb1a5a39ce823371d11b749.zip |
Fixes to make BRA introduction run:
- fixed location command parser
- implemented stop command
- temporary disabled speak zones (audio is not yet supported)
svn-id: r30796
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/exec_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/objects.cpp | 13 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parser_br.cpp | 22 | ||||
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 4 |
5 files changed, 30 insertions, 13 deletions
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index 0f2a703933..7826ddaeae 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -150,7 +150,7 @@ DECLARE_COMMAND_OPCODE(start) { } DECLARE_COMMAND_OPCODE(stop) { - warning("Parallaction_br::cmdOp_stop not yet implemented"); + _cmdRunCtxt.cmd->u._animation->_flags &= ~kFlagsActing; } diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 55d157db1b..3db9cb148a 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -222,7 +222,18 @@ Question::~Question() { } Instruction::Instruction() { - memset(this, 0, sizeof(Instruction)); + _index = 0; + _flags = 0; + + // common + _a = 0; + _z = 0; + _immediate = 0; + + // BRA specific + _text = 0; + _text2 = 0; + _y = 0; } Instruction::~Instruction() { diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 65fe52b6f3..edae8c9f37 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -191,7 +191,7 @@ void Parallaction_br::runPendingZones() { if (_activeZone) { z = _activeZone; // speak Zone or sound _activeZone = NULL; - runZone(z); +// runZone(z); // FIXME: BRA doesn't handle sound yet } if (_activeZone2) { diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 6ad08e0dc8..e193ab86b9 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -322,17 +322,19 @@ DECLARE_COMMAND_PARSER(location) { _locParseCtxt.nextToken++; if (_tokens[_locParseCtxt.nextToken][0] != '\0') { - _locParseCtxt.cmd->u._startPos.x = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._startPos.y = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - } + if (isdigit(_tokens[_locParseCtxt.nextToken][0]) || _tokens[_locParseCtxt.nextToken][0] == '-') { + _locParseCtxt.cmd->u._startPos.x = atoi(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.nextToken++; + _locParseCtxt.cmd->u._startPos.y = atoi(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.nextToken++; + } - if (_tokens[_locParseCtxt.nextToken][0] != '\0') { - _locParseCtxt.cmd->u._startPos2.x = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._startPos2.y = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + if (isdigit(_tokens[_locParseCtxt.nextToken][0]) || _tokens[_locParseCtxt.nextToken][0] == '-') { + _locParseCtxt.cmd->u._startPos2.x = atoi(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.nextToken++; + _locParseCtxt.cmd->u._startPos2.y = atoi(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.nextToken++; + } } parseCommandFlags(); diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index b5fdfc3502..4775344da7 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -613,9 +613,11 @@ void Parallaction_ns::parseCommandFlags() { } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { byte _al = _localFlagNames->lookup(&_tokens[_si][2]); + assert(_al != Table::notFound); cmd->_flagsOff |= 1 << (_al - 1); } else { byte _al = _localFlagNames->lookup(_tokens[_si]); + assert(_al != Table::notFound); cmd->_flagsOn |= 1 << (_al - 1); } @@ -638,9 +640,11 @@ void Parallaction_ns::parseCommandFlags() { } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { byte _al = _globalTable->lookup(&_tokens[_si][2]); + assert(_al != Table::notFound); cmd->_flagsOff |= 1 << (_al - 1); } else { byte _al = _globalTable->lookup(_tokens[_si]); + assert(_al != Table::notFound); cmd->_flagsOn |= 1 << (_al - 1); } |