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

athrxx noreply at scummvm.org
Wed Mar 27 20:56:24 UTC 2024


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:
be41ea3125 AGOS: (WW) - fix mouse cursor glitch


Commit: be41ea31254e33f8822533bf3397c1cb48358726
    https://github.com/scummvm/scummvm/commit/be41ea31254e33f8822533bf3397c1cb48358726
Author: athrxx (athrxx at scummvm.org)
Date: 2024-03-27T21:55:11+01:00

Commit Message:
AGOS: (WW) - fix mouse cursor glitch

This one is pretty obvious when comparing ScummVM
with DOSBox behaviour. After the cursor changes to
one of the arrow cursors, it often stays that way when
it should actually switch back to the normal cursor. I have
fixed it to match the original code.

Changed paths:
    engines/agos/verb.cpp


diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index 61fa9ad3f71..f2212260469 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -865,12 +865,10 @@ void AGOSEngine_Waxworks::boxController(uint x, uint y, uint mode) {
 
 	if ((getGameType() == GType_WW) && (_mouseCursor == 0 || _mouseCursor >= 4)) {
 		uint verb = best_ha->verb & 0x3FFF;
-		if (verb >= 239 && verb <= 242) {
-			uint cursor = verb - 235;
-			if (_mouseCursor != cursor) {
-				_mouseCursor = cursor;
-				_needHitAreaRecalc++;
-			}
+		uint cursor = (verb >= 239 && verb <= 242) ? verb - 235 : 0;
+		if (_mouseCursor != cursor) {
+			_mouseCursor = cursor;
+			_needHitAreaRecalc++;
 		}
 	}
 




More information about the Scummvm-git-logs mailing list