aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sci.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 4155fd2a1f..657a7b9ee2 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -444,9 +444,8 @@ static void patchGameSaveRestoreCode(SegManager *segMan, reg_t methodAddress, by
byte *patchPtr = const_cast<byte *>(script->getBuf(methodAddress.offset));
if (getSciVersion() <= SCI_VERSION_1_1)
memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave));
- else if (getSciVersion() == SCI_VERSION_2)
+ else // SCI2+
memcpy(patchPtr, patchGameRestoreSaveSci2, sizeof(patchGameRestoreSaveSci2));
- // TODO: SCI21/SCI3
patchPtr[8] = id;
}
@@ -459,10 +458,6 @@ void SciEngine::patchGameSaveRestore() {
byte kernelIdRestore = 0;
byte kernelIdSave = 0;
- // This feature is currently not supported in SCI21 or SCI3
- if (getSciVersion() >= SCI_VERSION_2_1)
- return;
-
switch (_gameId) {
case GID_MOTHERGOOSE256: // mother goose saves/restores directly and has no save/restore dialogs
case GID_JONES: // gets confused, when we patch us in, the game is only able to save to 1 slot, so hooking is not required
@@ -485,6 +480,11 @@ void SciEngine::patchGameSaveRestore() {
kernelIdSave = kernelNr;
}
+ // TODO: This feature does not yet work with the SCI2.1 middle and newer
+ // kernel functions (i.e. kSave)
+ if (!kernelIdRestore || !kernelIdSave)
+ return;
+
// Search for gameobject superclass ::restore
uint16 gameSuperObjectMethodCount = gameSuperObject->getMethodCount();
for (uint16 methodNr = 0; methodNr < gameSuperObjectMethodCount; methodNr++) {