diff options
author | Martin Kiewitz | 2010-08-06 15:06:42 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-06 15:06:42 +0000 |
commit | 2a4768401eeef5ec688524a24aba0740db0abf34 (patch) | |
tree | 49ed60ea28556c43d5006092e877d371cb6ae052 /engines/sci/engine/script.h | |
parent | eb112d671103b7021e466fd0b160efab7a91a26a (diff) | |
download | scummvm-rg350-2a4768401eeef5ec688524a24aba0740db0abf34.tar.gz scummvm-rg350-2a4768401eeef5ec688524a24aba0740db0abf34.tar.bz2 scummvm-rg350-2a4768401eeef5ec688524a24aba0740db0abf34.zip |
SCI: some work on the script patcher
signature matching is working (added hoyle 4 signature)
svn-id: r51787
Diffstat (limited to 'engines/sci/engine/script.h')
-rw-r--r-- | engines/sci/engine/script.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 3817f8aae1..8334cc838c 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -31,6 +31,15 @@ namespace Sci { +struct SciScriptSignature { + uint16 scriptNr; + const char *description; + uint32 magicDWord; + int magicOffset; + const byte *data; + const int16 *patch; +}; + struct EngineState; class ResourceManager; @@ -100,6 +109,9 @@ public: void init(int script_nr, ResourceManager *resMan); void load(ResourceManager *resMan); + void matchSignatureAndPatch(uint16 scriptNr, const byte *scriptData, const uint32 scriptSize); + int32 findSignature(const SciScriptSignature *signature, const byte *scriptData, const uint32 scriptSize); + virtual bool isValidOffset(uint16 offset) const; virtual SegmentRef dereference(reg_t pointer); virtual reg_t findCanonicAddress(SegManager *segMan, reg_t sub_addr) const; |