diff options
author | Filippos Karapetis | 2010-06-10 09:22:30 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-10 09:22:30 +0000 |
commit | cc6f5eb3e42bb4f7af47a70802a236fdbffc7b74 (patch) | |
tree | 7ee38a9ecb2c85f75ae8ea24d143a1d159fa6573 /engines/sci/engine/kparse.cpp | |
parent | eb4ec596cdb8e541d5221263b3db185bd01b206f (diff) | |
download | scummvm-rg350-cc6f5eb3e42bb4f7af47a70802a236fdbffc7b74.tar.gz scummvm-rg350-cc6f5eb3e42bb4f7af47a70802a236fdbffc7b74.tar.bz2 scummvm-rg350-cc6f5eb3e42bb4f7af47a70802a236fdbffc7b74.zip |
Unified invokeSelector() and invokeSelectorArgv(), and removed the INV_SEL kludge. Also, removed the selectorInvocation parameter - if invokeSelector() fails, the error is in most cases unrecoverable, and the error description thrown covers all cases where kContinueOnInvalidSelector was used. This uncovered a bug too: in some places, non reg_t parameters were parsed
svn-id: r49564
Diffstat (limited to 'engines/sci/engine/kparse.cpp')
-rw-r--r-- | engines/sci/engine/kparse.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp index 465bc177a0..bb9a49c7e8 100644 --- a/engines/sci/engine/kparse.cpp +++ b/engines/sci/engine/kparse.cpp @@ -94,8 +94,8 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) { ResultWordList words; reg_t event = argv[1]; Vocabulary *voc = g_sci->getVocabulary(); - voc->parser_event = event; + reg_t params[2] = { voc->parser_base, stringpos }; bool res = voc->tokenizeString(words, string.c_str(), &error); voc->parserIsValid = false; /* not valid */ @@ -118,7 +118,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) { s->r_acc = make_reg(0, 1); writeSelectorValue(segMan, event, SELECTOR(claimed), 1); - invokeSelector(INV_SEL(s, g_sci->getGameObject(), syntaxFail, kStopOnInvalidSelector), 2, voc->parser_base, stringpos); + invokeSelector(s, g_sci->getGameObject(), SELECTOR(syntaxFail), 2, params); /* Issue warning */ debugC(2, kDebugLevelParser, "Tree building failed"); @@ -141,7 +141,7 @@ reg_t kParse(EngineState *s, int argc, reg_t *argv) { debugC(2, kDebugLevelParser, "Word unknown: %s", error); /* Issue warning: */ - invokeSelector(INV_SEL(s, g_sci->getGameObject(), wordFail, kStopOnInvalidSelector), 2, voc->parser_base, stringpos); + invokeSelector(s, g_sci->getGameObject(), SELECTOR(wordFail), 2, params); free(error); return make_reg(0, 1); /* Tell them that it didn't work */ } |