aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-09-04 14:58:02 -0500
committerColin Snover2017-09-04 15:20:00 -0500
commit9d42bea857e23b66fd2e12a94fb4947acd7de029 (patch)
tree42cf22fb84599859e1d78d5ec6f960e784e91ce7
parentbdbcc9014897ad0ddc0296bdaa853831c275073c (diff)
downloadscummvm-rg350-9d42bea857e23b66fd2e12a94fb4947acd7de029.tar.gz
scummvm-rg350-9d42bea857e23b66fd2e12a94fb4947acd7de029.tar.bz2
scummvm-rg350-9d42bea857e23b66fd2e12a94fb4947acd7de029.zip
SCI32: Fix creating over 20 saves in Phant2 native save game
-rw-r--r--engines/sci/engine/script_patches.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 0d15b9e390..443920128b 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3912,7 +3912,7 @@ static const uint16 phant2SaveNamePatch2[] = {
// Phant2-specific version of sci2NumSavesSignature1/2
// Applies to at least: English CD
-static const uint16 phant2NumSavesSignature[] = {
+static const uint16 phant2NumSavesSignature1[] = {
SIG_MAGICDWORD,
0x8d, 0x01, // lst 1
0x35, 0x14, // ldi 20
@@ -3920,12 +3920,26 @@ static const uint16 phant2NumSavesSignature[] = {
SIG_END
};
-static const uint16 phant2NumSavesPatch[] = {
+static const uint16 phant2NumSavesPatch1[] = {
PATCH_ADDTOOFFSET(+2), // lst 1
0x35, 0x63, // ldi 99
PATCH_END
};
+static const uint16 phant2NumSavesSignature2[] = {
+ SIG_MAGICDWORD,
+ 0x8d, 0x00, // lst 0
+ 0x35, 0x14, // ldi 20
+ 0x22, // lt?
+ SIG_END
+};
+
+static const uint16 phant2NumSavesPatch2[] = {
+ PATCH_ADDTOOFFSET(+2), // lst 0
+ 0x35, 0x63, // ldi 99
+ PATCH_END
+};
+
// script, description, signature patch
static const SciScriptPatcherEntry phantasmagoria2Signatures[] = {
{ true, 0, "slow interface fades", 3, phant2SlowIFadeSignature, phant2SlowIFadePatch },
@@ -3935,7 +3949,8 @@ static const SciScriptPatcherEntry phantasmagoria2Signatures[] = {
{ true, 63019, "non-responsive mouse during computer load", 1, phant2CompSlideDoorsSignature, phant2CompSlideDoorsPatch },
{ true, 64990, "remove save game name mangling (1/2)", 1, phant2SaveNameSignature1, phant2SaveNamePatch1 },
{ true, 64994, "remove save game name mangling (2/2)", 1, phant2SaveNameSignature2, phant2SaveNamePatch2 },
- { true, 64990, "increase number of save games", 1, phant2NumSavesSignature, phant2NumSavesPatch },
+ { true, 64990, "increase number of save games", 1, phant2NumSavesSignature1, phant2NumSavesPatch1 },
+ { true, 64990, "increase number of save games", 2, phant2NumSavesSignature2, phant2NumSavesPatch2 },
SCI_SIGNATUREENTRY_TERMINATOR
};