[Scummvm-cvs-logs] SF.net SVN: scummvm:[50956] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sat Jul 17 14:06:33 CEST 2010
Revision: 50956
http://scummvm.svn.sourceforge.net/scummvm/?rev=50956&view=rev
Author: m_kiewitz
Date: 2010-07-17 12:06:31 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
SCI: fix debugging code of parser, add 0xffe special group into debug support
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kparse.cpp
scummvm/trunk/engines/sci/engine/scriptdebug.cpp
scummvm/trunk/engines/sci/parser/vocabulary.cpp
scummvm/trunk/engines/sci/parser/vocabulary.h
Modified: scummvm/trunk/engines/sci/engine/kparse.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kparse.cpp 2010-07-17 00:05:27 UTC (rev 50955)
+++ scummvm/trunk/engines/sci/engine/kparse.cpp 2010-07-17 12:06:31 UTC (rev 50956)
@@ -60,8 +60,8 @@
}
#ifdef DEBUG_PARSER
- debugC(2, kDebugLevelParser, "Said block:", 0);
- s->_voc->decipherSaidBlock(said_block);
+ printf("Said block: ");
+ g_sci->getVocabulary()->decipherSaidBlock(said_block);
#endif
if (voc->parser_event.isNull() || (readSelectorValue(s->_segMan, voc->parser_event, SELECTOR(claimed)))) {
Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2010-07-17 00:05:27 UTC (rev 50955)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2010-07-17 12:06:31 UTC (rev 50956)
@@ -489,7 +489,7 @@
printf("%04x: ", seeker);
while (seeker < _seeker) {
- unsigned char nextitem = script->data [seeker++];
+ uint16 nextitem = script->data [seeker++];
if (nextitem == 0xFF)
printf("\n%04x: ", seeker);
else if (nextitem >= 0xF0) {
Modified: scummvm/trunk/engines/sci/parser/vocabulary.cpp
===================================================================
--- scummvm/trunk/engines/sci/parser/vocabulary.cpp 2010-07-17 00:05:27 UTC (rev 50955)
+++ scummvm/trunk/engines/sci/parser/vocabulary.cpp 2010-07-17 12:06:31 UTC (rev 50956)
@@ -142,10 +142,13 @@
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 @@
}
void Vocabulary::decipherSaidBlock(byte *addr) {
- byte nextitem;
+ uint16 nextitem;
do {
nextitem = *addr++;
Modified: scummvm/trunk/engines/sci/parser/vocabulary.h
===================================================================
--- scummvm/trunk/engines/sci/parser/vocabulary.h 2010-07-17 00:05:27 UTC (rev 50955)
+++ scummvm/trunk/engines/sci/parser/vocabulary.h 2010-07-17 12:06:31 UTC (rev 50956)
@@ -78,6 +78,7 @@
/* 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list