[Scummvm-git-logs] scummvm branch-2-6 -> b286957e5efa305d67d14ba768dee5fa0af807c1

dreammaster noreply at scummvm.org
Sun Jun 12 23:34:18 UTC 2022


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:
b286957e5e CHEWY: Fix selecting consolue buttons in room 4


Commit: b286957e5efa305d67d14ba768dee5fa0af807c1
    https://github.com/scummvm/scummvm/commit/b286957e5efa305d67d14ba768dee5fa0af807c1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-06-12T16:34:04-07:00

Commit Message:
CHEWY: Fix selecting consolue buttons in room 4

Hotspot refactoring got rid of mouse offsets the original used,
so I fixed the areas associated with each button to compensate.

Changed paths:
    engines/chewy/rooms/room04.cpp


diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index f9a8c03ff96..93dc58c8678 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -43,10 +43,11 @@ int16 Room4::comp_probe() {
 		{ 188, 101 }
 	};
 
-	static const Common::Rect consoleHotspots[] = {
-		{  99, 165, 160, 206 },
-		{ 167, 166, 211, 200 },
-		{ 218, 161, 279, 200 }
+	// This can't be static because it makes them global objects
+	const Common::Rect CONSOLE_HOTSPOTS[] = {
+		{  80, 140, 120, 175 },
+		{ 140, 140, 170, 175 },
+		{ 195, 140, 235, 175 }
 	};
 
 	cur_2_inventory();
@@ -64,7 +65,7 @@ int16 Room4::comp_probe() {
 	while (!endLoop) {
 		mouseAction();
 		if (_G(mouseLeftClick)) {
-			switch (_G(in)->findHotspot(consoleHotspots)) {
+			switch (_G(in)->findHotspot(CONSOLE_HOTSPOTS)) {
 			case 0:
 				if (curX > 0)
 					--curX;




More information about the Scummvm-git-logs mailing list