diff options
| author | Willem Jan Palenstijn | 2015-05-03 17:17:25 +0200 |
|---|---|---|
| committer | Willem Jan Palenstijn | 2015-05-03 17:21:07 +0200 |
| commit | 3d0c691694ddcf00a5bfc347626d38625f057dee (patch) | |
| tree | ddc71b59abc595f7911de10e3209d64e703c92d0 /engines/sci/engine | |
| parent | 30b5497e24965849469be0ff5c2620eef5ebfa0e (diff) | |
| download | scummvm-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.cpp | 3 |
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 |
