SCI: improved patcher, inventory patch for kq6/mac

Also added new debug flag for script patcher
This commit is contained in:
Martin Kiewitz 2013-11-01 13:25:31 +01:00
parent c93249cfd0
commit f1abc0c302
4 changed files with 871 additions and 851 deletions

View File

@ -99,8 +99,8 @@ public:
void load(int script_nr, ResourceManager *resMan); void load(int script_nr, ResourceManager *resMan);
void matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uint32 scriptSize); void matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uint32 scriptSize);
int32 findSignature(const SciScriptSignature *signature, const 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); void applyPatch(const uint16 *patch, byte *scriptData, const uint32 scriptSize, int32 signatureOffset, bool isMacSci11);
virtual bool isValidOffset(uint16 offset) const; virtual bool isValidOffset(uint16 offset) const;
virtual SegmentRef dereference(reg_t pointer); virtual SegmentRef dereference(reg_t pointer);

File diff suppressed because it is too large Load Diff

View File

@ -112,6 +112,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam
DebugMan.addDebugChannel(kDebugLevelDclInflate, "DCL", "DCL inflate debugging"); DebugMan.addDebugChannel(kDebugLevelDclInflate, "DCL", "DCL inflate debugging");
DebugMan.addDebugChannel(kDebugLevelVM, "VM", "VM debugging"); DebugMan.addDebugChannel(kDebugLevelVM, "VM", "VM debugging");
DebugMan.addDebugChannel(kDebugLevelScripts, "Scripts", "Notifies when scripts are unloaded"); DebugMan.addDebugChannel(kDebugLevelScripts, "Scripts", "Notifies when scripts are unloaded");
DebugMan.addDebugChannel(kDebugLevelScriptPatcher, "ScriptPatcher", "Notifies when scripts are patched");
DebugMan.addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging"); DebugMan.addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging");
DebugMan.addDebugChannel(kDebugLevelResMan, "ResMan", "Resource manager debugging"); DebugMan.addDebugChannel(kDebugLevelResMan, "ResMan", "Resource manager debugging");
DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game"); DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game");

View File

@ -103,7 +103,8 @@ enum kDebugLevels {
kDebugLevelGC = 1 << 18, kDebugLevelGC = 1 << 18,
kDebugLevelResMan = 1 << 19, kDebugLevelResMan = 1 << 19,
kDebugLevelOnStartup = 1 << 20, kDebugLevelOnStartup = 1 << 20,
kDebugLevelDebugMode = 1 << 21 kDebugLevelDebugMode = 1 << 21,
kDebugLevelScriptPatcher = 1 << 22
}; };
enum SciGameId { enum SciGameId {