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/selector.h | |
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/selector.h')
-rw-r--r-- | engines/sci/engine/selector.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h index f50b9ab1b3..851ff6bc81 100644 --- a/engines/sci/engine/selector.h +++ b/engines/sci/engine/selector.h @@ -34,11 +34,6 @@ namespace Sci { -enum SelectorInvocation { - kStopOnInvalidSelector = 0, - kContinueOnInvalidSelector = 1 -}; - /** * Map a selector name to a selector id. Shortcut for accessing the selector cache. */ @@ -71,18 +66,8 @@ void writeSelector(SegManager *segMan, reg_t object, Selector selectorId, reg_t /** * Invokes a selector from an object. */ -int invokeSelector(EngineState *s, reg_t object, int selectorId, SelectorInvocation noinvalid, - int k_argc, StackPtr k_argp, int argc, ...); -int invokeSelectorArgv(EngineState *s, reg_t object, int selectorId, SelectorInvocation noinvalid, - int k_argc, StackPtr k_argp, int argc, const reg_t *argv); - -/** - * Kludge for use with invokeSelector(). Used for compatibility with compilers - * that cannot handle vararg macros. - */ -#define INV_SEL(s, _object_, _selector_, _noinvalid_) \ - s, _object_, g_sci->getKernel()->_selectorCache._selector_, _noinvalid_, argc, argv - +void invokeSelector(EngineState *s, reg_t object, int selectorId, + int k_argc, StackPtr k_argp, int argc = 0, const reg_t *argv = 0); } // End of namespace Sci |