From e000d2865450090d28f6a72608b963ece6435d4a Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sat, 17 Jul 2010 12:06:31 +0000 Subject: SCI: fix debugging code of parser, add 0xffe special group into debug support svn-id: r50956 --- engines/sci/parser/vocabulary.cpp | 7 +++++-- engines/sci/parser/vocabulary.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/sci/parser') diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp index e48a9cdfda..7b115a815d 100644 --- a/engines/sci/parser/vocabulary.cpp +++ b/engines/sci/parser/vocabulary.cpp @@ -142,10 +142,13 @@ bool Vocabulary::loadParserWords() { const char *Vocabulary::getAnyWordFromGroup(int group) { if (group == VOCAB_MAGIC_NUMBER_GROUP) return "{number}"; + if (group == VOCAB_MAGIC_NOTHING_GROUP) + return "{nothing}"; - for (WordMap::const_iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) + for (WordMap::const_iterator i = _parserWords.begin(); i != _parserWords.end(); ++i) { if (i->_value._group == group) return i->_key.c_str(); + } return "{invalid}"; } @@ -301,7 +304,7 @@ ResultWord Vocabulary::lookupWord(const char *word, int word_len) { } void Vocabulary::decipherSaidBlock(byte *addr) { - byte nextitem; + uint16 nextitem; do { nextitem = *addr++; diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h index dccef0f5f3..3317b6dfba 100644 --- a/engines/sci/parser/vocabulary.h +++ b/engines/sci/parser/vocabulary.h @@ -78,6 +78,7 @@ enum { /* This word class is used for numbers */ #define VOCAB_MAGIC_NUMBER_GROUP 0xffd /* 0xffe ? */ +#define VOCAB_MAGIC_NOTHING_GROUP 0xffe /* Number of nodes for each parse_tree_node structure */ #define VOCAB_TREE_NODES 500 -- cgit v1.2.3