[Scummvm-git-logs] scummvm master -> ce052fbef4f8f1007c3f64077dbe6d13499d4e7d

csnover csnover at users.noreply.github.com
Tue Oct 17 02:38:04 CEST 2017


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

Summary:
ce052fbef4 SCI32: Fix cursor color when quitting for phant1


Commit: ce052fbef4f8f1007c3f64077dbe6d13499d4e7d
    https://github.com/scummvm/scummvm/commit/ce052fbef4f8f1007c3f64077dbe6d13499d4e7d
Author: David Fioramonti (dafioram at gmail.com)
Date: 2017-10-16T19:37:36-05:00

Commit Message:
SCI32: Fix cursor color when quitting for phant1

When quitting the game at the main menu and hitting no
or quitting the game while playing the cursor color
over the buttons will be tan the first time rather
than red. This fix makes it so it will be red.

This was done by removing a check in HotSpot::doit()
which checks the global193 value. Removing this check
fixes the problem.

Fixes Trac#9977.

Thanks snover and wjp for your help.

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 d12a961..96ac938 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -3858,8 +3858,37 @@ static const uint16 phant1RatPatch[] = {
 	PATCH_END
 };
 
+// In Phantasmagoria the cursor's hover state will not trigger on any of the
+// buttons in the main menu after returning to the main menu from a game, or
+// when choosing "Quit" on the main menu and then cancelling the quit in the
+// confirmation dialogue, until another button has been hovered and unhovered
+// once.
+// This happens because the quit confirmation dialogue creates its own
+// event handling loop which prevents the main event loop from handling the
+// cursor leaving the button (which would reset global 193 to 0), and the
+// dialogue does not reset global193 itself, so it remains at 2 until a new
+// button gets hovered and unhovered.
+// There is not enough space in the confirmation dialogue code to add a reset
+// of global 193, so we just remove the check entirely, since it is only used
+// to avoid resetting the cursor's view on every mouse movement, and this
+// button type is only used on the main menu and the in-game control panel.
+//
+// Applies to at least: English CD
+static const uint16 phant1RedQuitCursorSignature[] = {
+	SIG_MAGICDWORD,
+	0x89, 0xc1,                   // lsg $c1
+	0x35, 0x02,                   // ldi 02
+	SIG_END
+};
+
+static const uint16 phant1RedQuitCursorPatch[] = {
+	0x33, 0x05,                   // jmp [past global193 check]
+	PATCH_END
+};
+
 //          script, description,                                      signature                        patch
 static const SciScriptPatcherEntry phantasmagoriaSignatures[] = {
+	{  true,    23, "make cursor red after clicking quit",         1, phant1RedQuitCursorSignature,    phant1RedQuitCursorPatch },
 	{  true,   901, "fix invalid array construction",              1, sci21IntArraySignature,          sci21IntArrayPatch },
 	{  true,  1111, "ignore audio settings from save game",        1, phant1SavedVolumeSignature,      phant1SavedVolumePatch },
 	{  true, 20200, "fix broken rat init in sEnterFromAlcove",     1, phant1RatSignature,              phant1RatPatch },





More information about the Scummvm-git-logs mailing list