aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel.h
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-08 21:22:59 +0000
committerMartin Kiewitz2010-07-08 21:22:59 +0000
commit7e05d6e62bd8e887ccea2302ad191a775150ccf8 (patch)
treeb6e4bfe8df724627be9676b04bb6881021f359c4 /engines/sci/engine/kernel.h
parent07fef4c6e6a385732c508fb8129b70dcc4a43571 (diff)
downloadscummvm-rg350-7e05d6e62bd8e887ccea2302ad191a775150ccf8.tar.gz
scummvm-rg350-7e05d6e62bd8e887ccea2302ad191a775150ccf8.tar.bz2
scummvm-rg350-7e05d6e62bd8e887ccea2302ad191a775150ccf8.zip
SCI: part of subfunction signature&mapping implemented, little cleanup
svn-id: r50750
Diffstat (limited to 'engines/sci/engine/kernel.h')
-rw-r--r--engines/sci/engine/kernel.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 429a7903a1..7fa3916b31 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -118,7 +118,7 @@ enum {
// ----------------------------------------------------------------------------
/* Generic description: */
-typedef reg_t KernelFunc(EngineState *s, int argc, reg_t *argv);
+typedef reg_t KernelFunctionCall(EngineState *s, int argc, reg_t *argv);
struct SciWorkaroundEntry {
SciGameId gameId;
@@ -133,12 +133,21 @@ struct SciWorkaroundEntry {
#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, 0, NULL, NULL, -1, 0, { 0, 0 } }
-struct KernelFuncWithSignature {
- KernelFunc *func; /**< The actual function */
+struct KernelSubFunction {
+ KernelFunctionCall *function;
+ const char *name;
+ uint16 *signature;
+ const SciWorkaroundEntry *workarounds;
+};
+
+struct KernelFunction {
+ KernelFunctionCall *function;
Common::String origName; /**< Original name, in case we couldn't map it */
bool isDummy;
uint16 *signature;
const SciWorkaroundEntry *workarounds;
+ const KernelSubFunction *subFunctions;
+ uint16 subFunctionCount;
};
enum AutoDetectedFeatures {
@@ -172,8 +181,8 @@ public:
void dumpScriptClass(char *data, int seeker, int objsize);
SelectorCache _selectorCache; /**< Shortcut list for important selectors. */
- typedef Common::Array<KernelFuncWithSignature> KernelFuncsContainer;
- KernelFuncsContainer _kernelFuncs; /**< Table of kernel functions. */
+ typedef Common::Array<KernelFunction> KernelFunctionArray;
+ KernelFunctionArray _kernelFuncs; /**< Table of kernel functions. */
/**
* Determines whether a list of registers matches a given signature.