aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2015-05-03 17:17:25 +0200
committerWillem Jan Palenstijn2015-05-03 17:21:07 +0200
commit3d0c691694ddcf00a5bfc347626d38625f057dee (patch)
treeddc71b59abc595f7911de10e3209d64e703c92d0 /engines/sci/engine
parent30b5497e24965849469be0ff5c2620eef5ebfa0e (diff)
downloadscummvm-rg350-3d0c691694ddcf00a5bfc347626d38625f057dee.tar.gz
scummvm-rg350-3d0c691694ddcf00a5bfc347626d38625f057dee.tar.bz2
scummvm-rg350-3d0c691694ddcf00a5bfc347626d38625f057dee.zip
SCI: Handle pronouns in parser
When parsing a sentence, its type 0x142 word (presumably the object) is now stored. Any pronouns (type 0x080) are then automatically replaced by this stored word.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kparse.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp
index aa89b963cc..f85f33e3e8 100644
--- a/engines/sci/engine/kparse.cpp
+++ b/engines/sci/engine/kparse.cpp
@@ -117,6 +117,8 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
}
#endif
+ voc->replacePronouns(words);
+
int syntax_fail = voc->parseGNF(words);
if (syntax_fail) {
@@ -130,6 +132,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) {
} else {
voc->parserIsValid = true;
+ voc->storePronounReference();
writeSelectorValue(segMan, event, SELECTOR(claimed), 0);
#ifdef DEBUG_PARSER