diff options
-rw-r--r-- | engines/sci/detection_tables.h | 15 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 21 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.h | 1 |
5 files changed, 41 insertions, 4 deletions
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 16f51a94a5..f279f9a08a 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1194,6 +1194,14 @@ static const struct ADGameDescription SciGameDescriptions[] = { GUIO_LINKSPEECHTOSFX, \ GUIO_NOASPECT) +// versions with bridge or poker have save/load screens +#define GUIO_HOYLE5_SAVELOAD GUIO6(GUIO_NOMIDI, \ + GUIO_NOLAUNCHLOAD, \ + GUIO_LINKMUSICTOSFX, \ + GUIO_LINKSPEECHTOSFX, \ + GUIO_NOASPECT, \ + GAMEOPTION_ORIGINAL_SAVELOAD ) + // Hoyle 5 (Hoyle Classic Games) - Windows demo {"hoyle5", "Demo", { {"ressci.000", 0, "98a39ae535dd01714ac313f8ba925045", 7260363}, @@ -1207,7 +1215,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.000", 0, "55ae04012a73abc15b93debf60a7df71", 16909704}, {"resmap.000", 0, "daf64a91344a7934fe4374765267c2af", 5767}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5_SAVELOAD }, // Hoyle 5 (Hoyle Classic Games for Laptops) - Windows // SCI 2.100.002 @@ -1216,7 +1224,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.000", 0, "ca50cf09f80a5f982a965afea852cc42", 3278849}, {"resmap.000", 0, "d5eef6f2529313e950c4d78251a95b1e", 4213}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5_SAVELOAD }, // Hoyle Bridge - Windows {"hoyle5bridge", "", { @@ -1224,7 +1232,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"ressci.000", 0, "b83cba09229d3003df9e0c864843f962", 16842499}, {"resmap.000", 0, "7b3e3030b0ad5f341053c18afce7d176", 5647}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5_SAVELOAD }, // Hoyle Children's Collection - Windows {"hoyle5children", "", { @@ -1251,6 +1259,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 }, #undef GUIO_HOYLE5 +#undef GUIO_HOYLE5_SAVELOAD #endif // ENABLE_SCI32 diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index f0ad559ba5..396df9181b 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -328,7 +328,7 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { { SIG_SINCE_SCI21MID, 15, MAP_CALL(FileIOReadWord), "i", NULL }, { SIG_SCI21MID_LATE, 16, MAP_CALL(FileIOWriteWord), "ii", NULL }, { SIG_SCI3, 16, MAP_CALL(FileIOWriteWord), "i[.!]", NULL }, - { SIG_SINCE_SCI21MID, 17, "FileIOCheckFreeSpace", kCheckFreeSpace, "i(r)", NULL }, + { SIG_SINCE_SCI21MID, 17, "FileIOCheckFreeSpace", kCheckFreeSpace, "i(r)", kFileIOCheckFreeSpace_workarounds }, { SIG_SINCE_SCI21MID, 18, MAP_CALL(FileIOGetCWD), "r", NULL }, { SIG_SINCE_SCI21MID, 19, MAP_CALL(FileIOIsValidDirectory), "[ro]", NULL }, #endif diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 1fb866db05..ad3402d81d 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -2149,6 +2149,9 @@ static const SciScriptPatcherEntry hoyle5Signatures[] = { // which is invoked via kWinDLL. We need to reverse the logic in PENGIN16.DLL and call it directly, in order to get this // game to work properly. Until then, this game entry will be disabled. { true, 975, "disable Poker", 1, hoyle5SignaturePoker, hoyle5PatchDisableGame }, + { true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, SCI_SIGNATUREENTRY_TERMINATOR }; @@ -2187,6 +2190,9 @@ static const SciScriptPatcherEntry hoyle5BridgeSignatures[] = { { true, 975, "disable Crazy Eights", 1, hoyle5SignatureCrazyEights, hoyle5PatchDisableGame }, { true, 975, "disable Old Maid", 1, hoyle5SignatureOldMaid, hoyle5PatchDisableGame }, { true, 975, "disable Checkers", 1, hoyle5SignatureCheckers, hoyle5PatchDisableGame }, + { true, 64990, "increase number of save games (1/2)", 1, sci2NumSavesSignature1, sci2NumSavesPatch1 }, + { true, 64990, "increase number of save games (2/2)", 1, sci2NumSavesSignature2, sci2NumSavesPatch2 }, + { true, 64990, "disable change directory button", 1, sci2ChangeDirSignature, sci2ChangeDirPatch }, SCI_SIGNATUREENTRY_TERMINATOR }; diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 24665c5857..ea1d553eeb 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -746,11 +746,32 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = { // gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround const SciWorkaroundEntry kFileIOOpen_workarounds[] = { + { GID_HOYLE5, -1, 64990, 0, "Restore", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when checking for bridgesg.cat or poker.cat when showing restore dialog { GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo { GID_TORIN, 61100, 61100, 0, "roPickAChapter", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo in the demo SCI_WORKAROUNDENTRY_TERMINATOR }; +// Game: Hoyle 5 +// Calling method: subroutine at offset 0x1074 +// Subroutine offset: 0x1432 (script 64990) +// Applies to at least: English PC +static const uint16 sig_kFileIOCheckFreeSpace_hoyle5_1[] = { + 0x7e, SIG_ADDTOOFFSET(2), // line N + 0x7d, 0x73, 0x61, 0x76, 0x65, // file "save.sc" + 0x2e, 0x73, 0x63, 0x00, + 0x3f, 0x02, // link 02 + 0x7e, SIG_ADDTOOFFSET(2), // line N + 0x38, SIG_UINT16(0x008d), // pushi new + SIG_END +}; + +// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround +const SciWorkaroundEntry kFileIOCheckFreeSpace_workarounds[] = { + { GID_HOYLE5, -1, 64990, 0, "Save", "update", sig_kFileIOCheckFreeSpace_hoyle5_1, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Extra argument when checking for free space when showing save dialog + SCI_WORKAROUNDENTRY_TERMINATOR +}; + // gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround const SciWorkaroundEntry kFindKey_workarounds[] = { { GID_ECOQUEST2, 100, 999, 0, "myList", "contains", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // When Noah Greene gives Adam the Ecorder, and just before the game gives a demonstration, a null reference to a list is passed - bug #4987 diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 17ea81fdda..b244f8ba1b 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -74,6 +74,7 @@ extern const SciWorkaroundEntry kDoAudioResume_workarounds[]; extern const SciWorkaroundEntry kDoSoundPlay_workarounds[]; extern const SciWorkaroundEntry kDoSoundFade_workarounds[]; extern const SciWorkaroundEntry kFileIOOpen_workarounds[]; +extern const SciWorkaroundEntry kFileIOCheckFreeSpace_workarounds[]; extern const SciWorkaroundEntry kFindKey_workarounds[]; extern const SciWorkaroundEntry kFrameOut_workarounds[]; extern const SciWorkaroundEntry kDeleteKey_workarounds[]; |