diff options
author | Max Horn | 2010-01-29 11:03:54 +0000 |
---|---|---|
committer | Max Horn | 2010-01-29 11:03:54 +0000 |
commit | 4ffec28103972992482dbb552d7f302ea09c1a31 (patch) | |
tree | ccefa339cd087c7298274d1234d7e048def51390 /engines/sci/engine/kernel.h | |
parent | 52ef12547feee896c632b842f5aebbdcc9c84bd8 (diff) | |
download | scummvm-rg350-4ffec28103972992482dbb552d7f302ea09c1a31.tar.gz scummvm-rg350-4ffec28103972992482dbb552d7f302ea09c1a31.tar.bz2 scummvm-rg350-4ffec28103972992482dbb552d7f302ea09c1a31.zip |
SCI: Move selector stuff to new header; reorder k_argc & k_argp param of invoke_selector
svn-id: r47665
Diffstat (limited to 'engines/sci/engine/kernel.h')
-rw-r--r-- | engines/sci/engine/kernel.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 0fc7ad4190..baff486443 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -195,54 +195,6 @@ private: Common::StringList _kernelNames; }; -/******************** Selector functionality ********************/ - -enum SelectorInvocation { - kStopOnInvalidSelector = 0, - kContinueOnInvalidSelector = 1 -}; - -/** - * Retrieves a selector from an object. - * @param segMan the segment mananger - * @param _obj_ the address of the object which the selector should be read from - * @param _slc_ the selector to read - * @return the selector value as a reg_t - * This macro halts on error. 'selector' must be a selector name registered in vm.h's - * SelectorCache and mapped in script.cpp. - */ -#define GET_SEL32(segMan, _obj_, _slc_) read_selector(segMan, _obj_, ((SciEngine*)g_engine)->getKernel()->_selectorCache._slc_) -#define GET_SEL32V(segMan, _obj_, _slc_) (GET_SEL32(segMan, _obj_, _slc_).offset) - -/** - * Writes a selector value to an object. - * @param segMan the segment mananger - * @param _obj_ the address of the object which the selector should be written to - * @param _slc_ the selector to read - * @param _val_ the value to write - * This macro halts on error. 'selector' must be a selector name registered in vm.h's - * SelectorCache and mapped in script.cpp. - */ -#define PUT_SEL32(segMan, _obj_, _slc_, _val_) write_selector(segMan, _obj_, ((SciEngine*)g_engine)->getKernel()->_selectorCache._slc_, _val_) -#define PUT_SEL32V(segMan, _obj_, _slc_, _val_) PUT_SEL32(segMan, _obj_, _slc_, make_reg(0, _val_)) - - -/** - * Kludge for use with invoke_selector(). Used for compatibility with compilers - * that cannot handle vararg macros. - */ -#define INV_SEL(_object_, _selector_, _noinvalid_) \ - s, _object_, s->_kernel->_selectorCache._selector_, _noinvalid_, argv, argc - - -reg_t read_selector(SegManager *segMan, reg_t object, Selector selector_id); -void write_selector(SegManager *segMan, reg_t object, Selector selector_id, reg_t value); -int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvocation noinvalid, - StackPtr k_argp, int k_argc, int argc, ...); -int invoke_selector_argv(EngineState *s, reg_t object, int selector_id, SelectorInvocation noinvalid, - StackPtr k_argp, int k_argc, int argc, const reg_t *argv); - - /******************** Text functionality ********************/ /** * Looks up text referenced by scripts |