diff options
| author | Martin Kiewitz | 2010-07-20 17:58:04 +0000 |
|---|---|---|
| committer | Martin Kiewitz | 2010-07-20 17:58:04 +0000 |
| commit | a0ce89d2e987197df321d0f0fa40b1f4d77f9ba9 (patch) | |
| tree | d8f3169840461d703174dfaf0143c71f1bb9c944 /engines/sci/engine/kernel.h | |
| parent | f771a2bbc78b2119d9666c112e6f49d7f13e2e3a (diff) | |
| download | scummvm-rg350-a0ce89d2e987197df321d0f0fa40b1f4d77f9ba9.tar.gz scummvm-rg350-a0ce89d2e987197df321d0f0fa40b1f4d77f9ba9.tar.bz2 scummvm-rg350-a0ce89d2e987197df321d0f0fa40b1f4d77f9ba9.zip | |
SCI: clean up workaround tables/code
svn-id: r51068
Diffstat (limited to 'engines/sci/engine/kernel.h')
| -rw-r--r-- | engines/sci/engine/kernel.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index baae5d7cd8..6fea670623 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -120,6 +120,18 @@ enum { /* Generic description: */ typedef reg_t KernelFunctionCall(EngineState *s, int argc, reg_t *argv); +enum SciWorkaroundType { + WORKAROUND_NONE, // only used by terminator or when no workaround was found + WORKAROUND_IGNORE, // ignore kernel call + WORKAROUND_STILLCALL, // still do kernel call + WORKAROUND_FAKE // fake kernel call / replace temp value / fake opcode +}; + +struct SciWorkaroundSolution { + SciWorkaroundType type; + uint16 value; +}; + struct SciWorkaroundEntry { SciGameId gameId; int roomNr; @@ -129,10 +141,10 @@ struct SciWorkaroundEntry { const char *methodName; int localCallOffset; int index; - reg_t newValue; + SciWorkaroundSolution newValue; }; -#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, -1, 0, { 0, 0 } } +#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, -1, 0, { WORKAROUND_NONE, 0 } } struct KernelSubFunction { KernelFunctionCall *function; |
