aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-17 12:06:31 +0000
committerMartin Kiewitz2010-07-17 12:06:31 +0000
commite000d2865450090d28f6a72608b963ece6435d4a (patch)
tree7b62ce156ef6ddf3c93180576dd10708cca8b0a7 /engines/sci/parser
parent83e2aa236092120bf03efbf38558f69719dda11a (diff)
downloadscummvm-rg350-e000d2865450090d28f6a72608b963ece6435d4a.tar.gz
scummvm-rg350-e000d2865450090d28f6a72608b963ece6435d4a.tar.bz2
scummvm-rg350-e000d2865450090d28f6a72608b963ece6435d4a.zip
SCI: fix debugging code of parser, add 0xffe special group into debug support
svn-id: r50956
Diffstat (limited to 'engines/sci/parser')
-rw-r--r--engines/sci/parser/vocabulary.cpp7
-rw-r--r--engines/sci/parser/vocabulary.h1
2 files changed, 6 insertions, 2 deletions
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