diff options
author | Martin Kiewitz | 2010-08-24 14:40:18 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-24 14:40:18 +0000 |
commit | 5fbe5f049bfe26a2a788dc8736b3186b53d52248 (patch) | |
tree | f4ee6558e4001a19c04832de4582ef0807db74c1 /engines/sci/sci.cpp | |
parent | af6492fa4577df301abaf76c040cd70d26073009 (diff) | |
download | scummvm-rg350-5fbe5f049bfe26a2a788dc8736b3186b53d52248.tar.gz scummvm-rg350-5fbe5f049bfe26a2a788dc8736b3186b53d52248.tar.bz2 scummvm-rg350-5fbe5f049bfe26a2a788dc8736b3186b53d52248.zip |
SCI: more work on replacing save dialog
also removing some previous code, because it wont work that way
svn-id: r52342
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r-- | engines/sci/sci.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 2f71a716da..9ed6a6932b 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -330,12 +330,12 @@ Common::Error SciEngine::run() { return Common::kNoError; } -static byte patchGameRestore[] = { +static byte patchGameRestoreSave[] = { 0x39, 0x03, // pushi 03 0x76, // push0 0x38, 0xff, 0xff, // pushi -1 0x76, // push0 - 0x43, 0xff, 0x06, // call kRestoreGame (will get fixed directly) + 0x43, 0xff, 0x06, // call kRestoreGame/kSaveGame (will get fixed directly) 0x48, // ret }; @@ -381,12 +381,6 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { scriptRestorePtr = script->getBuf(methodAddress.offset); break; } - if (methodName == "save") { - methodAddress = gameSuperObject->getFunction(methodNr); - Script *script = segMan->getScript(methodAddress.segment); - scriptSavePtr = script->getBuf(methodAddress.offset); - break; - } } switch (_gameId) { @@ -399,10 +393,15 @@ void SciEngine::patchGameSaveRestore(SegManager *segMan) { if (scriptRestorePtr) { // Now patch in our code byte *patchPtr = const_cast<byte *>(scriptRestorePtr); - memcpy(patchPtr, patchGameRestore, sizeof(patchGameRestore)); + memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); patchPtr[8] = kernelIdRestore; } - // Saving is not yet patched + //if (scriptSavePtr) { + // // Now patch in our code + // byte *patchPtr = const_cast<byte *>(scriptSavePtr); + // memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); + // patchPtr[8] = kernelIdSave; + //} } bool SciEngine::initGame() { |