[Scummvm-git-logs] scummvm master -> 80f428b9301b276010d6800f58b1befb05df915d
bluegr
noreply at scummvm.org
Tue Mar 5 00:00:36 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:
44373c95a4 AGI: Reset AGIMOUSE button state when changing rooms
80f428b930 AGI: Remove AGIMOUSE polling code
Commit: 44373c95a4b4a1b4853a5b20a12e0c036086a8e9
https://github.com/scummvm/scummvm/commit/44373c95a4b4a1b4853a5b20a12e0c036086a8e9
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-05T02:00:33+02:00
Commit Message:
AGI: Reset AGIMOUSE button state when changing rooms
Fixes infinite loop in "DG: The AGIMouse Adventure", bug #10737
Changed paths:
engines/agi/cycle.cpp
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 30b1e4232e8..4ba16ae3daa 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -151,6 +151,12 @@ void AgiEngine::interpretCycle() {
_veryFirstInitialCycle = false;
artificialDelay_CycleDone();
resetControllers();
+
+ // Reset mouse button state after new.room, because we don't poll input.
+ // Otherwise, AGIMOUSE games that call new.room in response to a click
+ // will enter an infinite loop due to the mouse button global (27) never
+ // resetting to zero. Bug #10737
+ _mouse.button = kAgiMouseButtonUp;
}
_veryFirstInitialCycle = false;
artificialDelay_CycleDone();
Commit: 80f428b9301b276010d6800f58b1befb05df915d
https://github.com/scummvm/scummvm/commit/80f428b9301b276010d6800f58b1befb05df915d
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-05T02:00:33+02:00
Commit Message:
AGI: Remove AGIMOUSE polling code
The AGIMOUSE protocol is for three mouse variables to be set by the
interpreter in response to opcode 171. This code updated two of the
three variables when processing events, causing the variables to
unexpectedly change in the middle of a game cycle, such as when
displaying a message box.
Fixes phantom clicks in "DG: The AGIMouse Adventure"
Changed paths:
engines/agi/cycle.cpp
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 4ba16ae3daa..7ee995503e6 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -187,13 +187,6 @@ uint16 AgiEngine::processAGIEvents() {
wait(10);
uint16 key = doPollKeyboard();
- // In AGI Mouse emulation mode we must update the mouse-related
- // vars in every interpreter cycle.
- if (getFeatures() & GF_AGIMOUSE) {
- setVar(VM_VAR_MOUSE_X, _mouse.pos.x / 2);
- setVar(VM_VAR_MOUSE_Y, _mouse.pos.y);
- }
-
if (!cycleInnerLoopIsActive()) {
// Click-to-walk mouse interface
if (_game.playerControl && (screenObjEgo->flags & fAdjEgoXY)) {
More information about the Scummvm-git-logs
mailing list