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/parallaction/parser_br.cpp | |
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/parallaction/parser_br.cpp')
-rw-r--r-- | engines/parallaction/parser_br.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
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(); |