[Scummvm-git-logs] scummvm branch-2-7 -> ac0214df18357284096ce756042fc331a0d7276e

sluicebox noreply at scummvm.org
Thu Jan 26 02:41:35 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
10d3d5a841 SCI: Add workarounds for original save/restore dialogs
ac0214df18 SCI: Remove extra semicolon


Commit: 10d3d5a841b7c28ef8bf2128b3443d1929c13040
    https://github.com/scummvm/scummvm/commit/10d3d5a841b7c28ef8bf2128b3443d1929c13040
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-01-25T18:41:06-08:00

Commit Message:
SCI: Add workarounds for original save/restore dialogs

Changed paths:
    engines/sci/detection.h
    engines/sci/engine/workarounds.cpp


diff --git a/engines/sci/detection.h b/engines/sci/detection.h
index e6dc9ead709..8530576c1b3 100644
--- a/engines/sci/detection.h
+++ b/engines/sci/detection.h
@@ -45,6 +45,7 @@ namespace Sci {
 #define GAMEOPTION_TTS                      GUIO_GAMEOPTIONS17
 
 enum SciGameId {
+	GID_ALL,
 	GID_ASTROCHICKEN,
 	GID_CAMELOT,
 	GID_CASTLEBRAIN,
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 7a782c29c10..47c1087edf0 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -347,6 +347,8 @@ static const uint16 sig_uninitread_sq1_1[] = {
 // Workarounds for uninitialized reads for parameters
 //    gameID,           room,script,lvl,          object-name, method-name,       local-call-signature, index-range,  workaround
 const SciWorkaroundEntry uninitializedReadForParamWorkarounds[] = {
+	{ GID_ALL,            -1,   990, -1,            "Restore", "doit",                         nullptr,     1,     1,{ WORKAROUND_FAKE,   0 } }, // When opening original restore dialog in SCI16 games
+	{ GID_ALL,            -1, 64990, -1,            "Restore", "doit",                         nullptr,     1,     1,{ WORKAROUND_FAKE,   0 } }, // When opening original restore dialog in SCI32 games
 	{ GID_GK1,            -1,    12, -1,          "GKIconbar", "showInvItem",                  nullptr,     1,     1,{ WORKAROUND_FAKE,   1 } }, // When showing the icon bar containing an inventory item
 	{ GID_HOYLE5,         -1,    15, -1,               "Hand", "add",                          nullptr,     1,     1,{ WORKAROUND_FAKE,   0 } }, // When the game adds cards to your hand in any mini-game
 	{ GID_HOYLE5,        700,   730,  0,              nullptr, "runningSuit",                  nullptr,     2,     2,{ WORKAROUND_FAKE,   0 } }, // when an opponent is playing in Bridge
@@ -364,6 +366,7 @@ const SciWorkaroundEntry uninitializedReadForParamWorkarounds[] = {
 // Workarounds for uninitialized reads for temporary variables
 //    gameID,           room,script,lvl,          object-name, method-name,       local-call-signature, index-range,  workaround
 const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
+	{ GID_ALL,            -1,   990,  0,            "Restore", "doit",                         nullptr,   364,   364, { WORKAROUND_FAKE,   0 } }, // When pressing Restore button in original restore dialog when list is empty
 	{ GID_CAMELOT,        40,    40,  0,               "Rm40", "handleEvent",                  nullptr,     0,     0, { WORKAROUND_FAKE,   0 } }, // when looking at the ground at the pool of Siloam - bug #6401
 	{ GID_CASTLEBRAIN,   280,   280,  0,         "programmer", "dispatchEvent",                nullptr,     0,     0, { WORKAROUND_FAKE, 0xf } }, // pressing 'q' on the computer screen in the robot room, and closing the help dialog that pops up (bug #5143). Moves the cursor to the view with the ID returned (in this case, the robot hand)
 	{ GID_CASTLEBRAIN,   320,   325,  0,               "word", "dispatchEvent",                nullptr,    14,    15, { WORKAROUND_FAKE,   0 } }, // holding down enter key during the word search puzzle, temp 14 and 15 - bug #9783
@@ -527,7 +530,6 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
 	{ GID_QFG2,           -1,    71,  0,        "theInvSheet", "doit",                         nullptr,     1,     1, { WORKAROUND_FAKE,   0 } }, // accessing the inventory
 	{ GID_QFG2,           -1,    79,  0,        "TryToMoveTo", "onTarget",                     nullptr,     0,     0, { WORKAROUND_FAKE,   0 } }, // when throwing pot at air elemental, happens when client coordinates are the same as airElemental coordinates. happened to me right after room change - bug #6859
 	{ GID_QFG2,           -1,   701, -1,              "Alley", "at",                           nullptr,     0,     0, { WORKAROUND_FAKE,   0 } }, // when walking inside the alleys in the town - bug #5019 & #5106
-	{ GID_QFG2,           -1,   990,  0,            "Restore", "doit",                         nullptr,   364,   364, { WORKAROUND_FAKE,   0 } }, // when pressing enter in restore dialog w/o any saved games present
 	{ GID_QFG2,          260,   260,  0,             "abdulS", "changeState",    sig_uninitread_qfg2_1,    -1,    -1, { WORKAROUND_FAKE,   0 } }, // During the thief's first mission (in the house), just before Abdul is about to enter the house (where you have to hide in the wardrobe), bug #5153, temps 1 and 2
 	{ GID_QFG2,          260,   260,  0,            "jabbarS", "changeState",    sig_uninitread_qfg2_1,    -1,    -1, { WORKAROUND_FAKE,   0 } }, // During the thief's first mission (in the house), just before Jabbar is about to enter the house (where you have to hide in the wardrobe), bug #5164, temps 1 and 2
 	{ GID_QFG2,          500,   500,  0,   "lightNextCandleS", "changeState",                  nullptr,    -1,    -1, { WORKAROUND_FAKE,   0 } }, // Inside the last room, while Ad Avis performs the ritual to summon the genie - bug #5566
@@ -1170,7 +1172,7 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun
 				bool objectNameMatches = (workaround->objectName == nullptr) ||
 										 (workaround->objectName == searchObjectName);
 
-				if (workaround->gameId == gameId
+				if (((workaround->gameId == GID_ALL) || (workaround->gameId == gameId))
 						&& ((workaround->scriptNr == -1) || (workaround->scriptNr == curScriptNr))
 						&& ((workaround->roomNr == -1) || (workaround->roomNr == curRoomNumber))
 						&& ((workaround->inheritanceLevel == -1) || (workaround->inheritanceLevel == inheritanceLevel))


Commit: ac0214df18357284096ce756042fc331a0d7276e
    https://github.com/scummvm/scummvm/commit/ac0214df18357284096ce756042fc331a0d7276e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-01-25T18:41:06-08:00

Commit Message:
SCI: Remove extra semicolon

Changed paths:
    engines/sci/sound/drivers/casio.cpp


diff --git a/engines/sci/sound/drivers/casio.cpp b/engines/sci/sound/drivers/casio.cpp
index b350bdd7968..c4fc37dd8c7 100644
--- a/engines/sci/sound/drivers/casio.cpp
+++ b/engines/sci/sound/drivers/casio.cpp
@@ -201,7 +201,7 @@ void MidiDriver_Casio::playSwitch(bool play) {
 	_playSwitch = play;
 	if (!_playSwitch)
 		stopAllNotes(0xFF, 0xFF);
-};
+}
 
 void MidiDriver_Casio::noteOn(byte outputChannel, byte note, byte velocity, int8 source) {
 	if (velocity == 0) {




More information about the Scummvm-git-logs mailing list