diff options
author | Martin Kiewitz | 2013-11-03 23:49:31 +0100 |
---|---|---|
committer | Martin Kiewitz | 2013-11-03 23:49:31 +0100 |
commit | 3fbbdbc2dac29b63547d9302b531015433fcb625 (patch) | |
tree | a92cf59a18eb7cabcb0ed99695b767654d7e9dba /engines/sci/engine/script.h | |
parent | 7da5c8c514ae0bd62dd96fdd30e9a3db5bc9eca9 (diff) | |
download | scummvm-rg350-3fbbdbc2dac29b63547d9302b531015433fcb625.tar.gz scummvm-rg350-3fbbdbc2dac29b63547d9302b531015433fcb625.tar.bz2 scummvm-rg350-3fbbdbc2dac29b63547d9302b531015433fcb625.zip |
SCI: improved script patcher
Gabriel Knight + King's Quest 6 patches now also work for Mac versions of those games
added support for selectors instead of using hardcoded values
Diffstat (limited to 'engines/sci/engine/script.h')
-rw-r--r-- | engines/sci/engine/script.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 7dde7f4be6..56a9004226 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -30,7 +30,7 @@ namespace Sci { struct EngineState; class ResourceManager; -struct SciScriptSignature; +struct SciScriptPatcherEntry; enum ScriptObjectTypes { SCI_OBJ_TERMINATOR, @@ -98,9 +98,10 @@ public: void freeScript(); void load(int script_nr, ResourceManager *resMan); - void matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uint32 scriptSize); - int32 findSignature(const SciScriptSignature *signature, const byte *scriptData, const uint32 scriptSize, bool isMacSci11); - void applyPatch(const uint16 *patch, byte *scriptData, const uint32 scriptSize, int32 signatureOffset, bool isMacSci11); + void patcherProcessScript(uint16 scriptNr, byte *scriptData, const uint32 scriptSize); + void patcherInitSignature(SciScriptPatcherEntry *patchTable, bool isMacSci11); + int32 patcherFindSignature(const SciScriptPatcherEntry *patchEntry, const byte *scriptData, const uint32 scriptSize, bool isMacSci11); + void patcherApplyPatch(const SciScriptPatcherEntry *patchEntry, byte *scriptData, const uint32 scriptSize, int32 signatureOffset, bool isMacSci11); virtual bool isValidOffset(uint16 offset) const; virtual SegmentRef dereference(reg_t pointer); |