[Scummvm-git-logs] scummvm master -> dbb93adee424c29f0d934468aae1e3c57139cd22
sluicebox
noreply at scummvm.org
Sat Jun 15 06:15:11 UTC 2024
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:
2dec932aff SCI32: HOYLE5 script patch cleanup
dbb93adee4 SCI32: Add support for HOYLE5 School House Math variant
Commit: 2dec932affee50210d4def871fc0dd531fe32604
https://github.com/scummvm/scummvm/commit/2dec932affee50210d4def871fc0dd531fe32604
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-06-15T00:00:56-06:00
Commit Message:
SCI32: HOYLE5 script patch cleanup
Changed paths:
engines/sci/engine/script_patches.cpp
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index faaa58cb6d2..8e2c52b0660 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2561,90 +2561,77 @@ static const uint16 hoyle5PatchSetScale[] = {
// - Poker (script 1100)
// - Backgammon (script 1300)
static const uint16 hoyle5SignatureHearts[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0xdc, 0x03, // lofsa chooseHearts
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x03dc), // lofsa chooseHearts
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignatureGinRummy[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0xbc, 0x02, // lofsa chooseGinRummy
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x02bc), // lofsa chooseGinRummy
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignatureCribbage[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0x4c, 0x03, // lofsa chooseCribbage
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x034c), // lofsa chooseCribbage
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignatureKlondike[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0xfc, 0x04, // lofsa chooseKlondike
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x04fc), // lofsa chooseKlondike
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignatureBridge[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0x6c, 0x04, // lofsa chooseBridge
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x046c), // lofsa chooseBridge
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignaturePoker[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0x8c, 0x05, // lofsa choosePoker
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x058c), // lofsa choosePoker
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5SignatureBackgammon[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ 0x76, // push0
+ SIG_ADDTOOFFSET(+4),
SIG_MAGICDWORD,
- 0x38, 0x8e, 0x00, // pushi 008e
- 0x76, // push0
- 0x38, 0xf0, 0x02, // pushi 02f0
- 0x76, // push0
- 0x72, 0xac, 0x06, // lofsa chooseBackgammon
- 0x4a, 0x08, 0x00, // send 0008
+ 0x72, SIG_UINT16(0x06ac), // lofsa chooseBackgammon
+ 0x4a, SIG_UINT16(0x0008), // send 08
SIG_END
};
static const uint16 hoyle5PatchDisableGame[] = {
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
- 0x35, 0x00, // ldi 00
+ 0x33, 0x0c, // jmp 0c
PATCH_END
};
Commit: dbb93adee424c29f0d934468aae1e3c57139cd22
https://github.com/scummvm/scummvm/commit/dbb93adee424c29f0d934468aae1e3c57139cd22
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-06-15T00:12:04-06:00
Commit Message:
SCI32: Add support for HOYLE5 School House Math variant
Changed paths:
engines/sci/detection.cpp
engines/sci/detection_tables.h
engines/sci/engine/script_patches.cpp
engines/sci/graphics/frameout.cpp
engines/sci/metaengine.cpp
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index f8e3bea2787..b9934fe026d 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -137,6 +137,7 @@ static const PlainGameDescriptor s_sciGameTitles[] = {
{"hoyle5", "Hoyle Classic Games"},
{"hoyle5bridge", "Hoyle Bridge"},
{"hoyle5children", "Hoyle Children's Collection"},
+ {"hoyle5school", "Hoyle School House Math"},
{"hoyle5solitaire", "Hoyle Solitaire"},
{"chest", "Inside the Chest"}, // aka Behind the Developer's Shield
{"gk2", "The Beast Within: A Gabriel Knight Mystery"},
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 39de8c98d55..2c44a80f1e8 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1436,6 +1436,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 },
+ // Hoyle School House Math - Windows
+ // This appears on "Sierra's School House Math" CD
+ {"hoyle5school", "", {
+ {"resmap.000", 0, "ed75b87fd5b69097e3a09dd39de7e2fe", 3697},
+ {"ressci.000", 0, "cbfe69aa4b9e23ddbf640301709a65eb", 2478642},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DROPPLATFORM, GUIO_HOYLE5 },
+
// Hoyle Solitaire (CD version) - Windows
// resource.aud is excluded because it is an empty file (zero bytes)
{"hoyle5solitaire", "CD", {
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 8e2c52b0660..f43fa583824 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -2531,7 +2531,7 @@ static const uint16 hoyle5SetScaleSignature[] = {
SIG_MAGICDWORD,
0x38, SIG_SELECTOR16(setScale), // pushi setScale ($14b)
0x38, SIG_UINT16(0x05), // pushi 5
- 0x51, 0x2c, // class Scaler
+ 0x51, // class Scaler
SIG_END
};
@@ -2635,6 +2635,57 @@ static const uint16 hoyle5PatchDisableGame[] = {
PATCH_END
};
+// Hoyle School House Math is similar to the Children's Collection and Bridge
+// versions above, where the individual card games were launched externally
+// by passing a config file to the interpreter. The menus for this game are
+// present, although they are still using Hoyle4 graphics, but they are missing
+// some scripts and resources. We work around this with three patches:
+//
+// 1. Skip the broken Sierra logo (room 900) and go to the intro (room 2)
+// 2. Disable the broken buttons on the main menu
+// 3. Disable Euchre and Bridge buttons, because those games aren't present
+static const uint16 hoyle5SignatureSierraLogo[] = {
+ SIG_MAGICDWORD,
+ 0x38, SIG_SELECTOR16(newRoom), // pushi newRoom
+ 0x78, // push1
+ 0x38, SIG_UINT16(0x0384), // pushi 0384 [ room 900: sierra ]
+ SIG_END
+};
+
+static const uint16 hoyle5PatchSierraLogo[] = {
+ PATCH_ADDTOOFFSET(+4),
+ 0x38, PATCH_UINT16(0x0002), // pushi 0002 [ room 2: intro ]
+ PATCH_END
+};
+
+static const uint16 hoyle5SignatureMainMenuButtons[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ SIG_ADDTOOFFSET(+33),
+ SIG_MAGICDWORD,
+ 0x72, SIG_UINT16(0x050e), // lofsa information
+ 0x4a, SIG_UINT16(0x0008), // send 08
+ SIG_END
+};
+
+static const uint16 hoyle5PatchMainMenuButtons[] = {
+ 0x32, PATCH_UINT16(0x0027), // jmp 0027 [ skip button init ]
+ PATCH_END
+};
+
+static const uint16 hoyle5SignatureEuchreBridge[] = {
+ 0x38, SIG_SELECTOR16(init), // pushi init
+ SIG_ADDTOOFFSET(+19),
+ SIG_MAGICDWORD,
+ 0x72, SIG_UINT16(0x037a), // lofsa chooseBridge
+ 0x4a, SIG_UINT16(0x0008), // send 08
+ SIG_END
+};
+
+static const uint16 hoyle5PatchEuchreBridge[] = {
+ 0x32, PATCH_UINT16(0x0019), // jmp 0019 [ skip button init ]
+ PATCH_END
+};
+
// During Bridge, Declarer_Second_NT:think performs a bitwise or against an
// object due to a script typo. This script bug is also in Hoyle4, see its
// patch notes above for more detail.
@@ -2742,6 +2793,9 @@ static const SciScriptPatcherEntry hoyle5Signatures[] = {
{ false, 975, "disable Poker", 1, hoyle5SignaturePoker, hoyle5PatchDisableGame },
{ false, 975, "disable Hearts", 1, hoyle5SignatureHearts, hoyle5PatchDisableGame },
{ false, 975, "disable Backgammon", 1, hoyle5SignatureBackgammon, hoyle5PatchDisableGame },
+ { false, 0, "disable sierra logo", 1, hoyle5SignatureSierraLogo, hoyle5PatchSierraLogo },
+ { false, 2, "disable main menu buttons", 1, hoyle5SignatureMainMenuButtons, hoyle5PatchMainMenuButtons },
+ { false, 975, "disable Euchre and Bridge", 1, hoyle5SignatureEuchreBridge, hoyle5PatchEuchreBridge},
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -9224,7 +9278,7 @@ static const uint16 larry6HiresSetScaleSignature[] = {
SIG_MAGICDWORD,
0x38, SIG_SELECTOR16(setScale), // pushi setScale ($14b)
0x38, SIG_UINT16(0x0005), // pushi 5
- 0x51, 0x2c, // class Scaler
+ 0x51, // class Scaler
SIG_END
};
@@ -25916,7 +25970,12 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) {
}
break;
case GID_HOYLE5:
- if (!g_sci->getResMan()->testResource(ResourceId(kResourceTypeScript, 700))) {
+ if (g_sci->getResMan()->testResource(ResourceId(kResourceTypeView, 21))) {
+ // Hoyle school house math
+ enablePatch(signatureTable, "disable sierra logo");
+ enablePatch(signatureTable, "disable main menu buttons");
+ enablePatch(signatureTable, "disable Euchre and Bridge");
+ } else if (!g_sci->getResMan()->testResource(ResourceId(kResourceTypeScript, 700))) {
// Hoyle 5 children's collection
enablePatch(signatureTable, "disable Gin Rummy");
enablePatch(signatureTable, "disable Cribbage");
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index f006499c082..6c95d245250 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -83,6 +83,13 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
switch (g_sci->getGameId()) {
case GID_HOYLE5:
+ if (g_sci->getResMan()->testResource(ResourceId(kResourceTypeView, 21))) {
+ // Hoyle school house math
+ _scriptWidth = 320;
+ _scriptHeight = 200;
+ break;
+ }
+ // fall-through
case GID_LIGHTHOUSE:
case GID_LSL7:
case GID_PHANTASMAGORIA2:
diff --git a/engines/sci/metaengine.cpp b/engines/sci/metaengine.cpp
index 644992fd052..4072aade131 100644
--- a/engines/sci/metaengine.cpp
+++ b/engines/sci/metaengine.cpp
@@ -78,6 +78,7 @@ static const GameIdStrToEnum s_gameIdStrToEnum[] = {
{ "hoyle5", "hoyle4", GID_HOYLE5, true, SCI_VERSION_2_1_MIDDLE },
{ "hoyle5bridge", "", GID_HOYLE5, true, SCI_VERSION_2_1_MIDDLE },
{ "hoyle5children", "", GID_HOYLE5, true, SCI_VERSION_2_1_MIDDLE },
+ { "hoyle5school", "", GID_HOYLE5, true, SCI_VERSION_2_1_MIDDLE },
{ "hoyle5solitaire", "", GID_HOYLE5, true, SCI_VERSION_2_1_MIDDLE },
{ "iceman", "iceman", GID_ICEMAN, false, SCI_VERSION_NONE },
{ "inndemo", "", GID_INNDEMO, false, SCI_VERSION_NONE },
More information about the Scummvm-git-logs
mailing list