[Scummvm-git-logs] scummvm branch-2-8 -> 334627b4c20cf2b5585db8c22c59c38d3f8fbed7
sluicebox
noreply at scummvm.org
Tue Mar 5 00:02:55 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:
2365826779 AGI: Reset AGIMOUSE button state when changing rooms
334627b4c2 AGI: Remove AGIMOUSE polling code
Commit: 2365826779bc01530df4b79a5d81f54b39ae728f
https://github.com/scummvm/scummvm/commit/2365826779bc01530df4b79a5d81f54b39ae728f
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-04T17:02:31-07: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: 334627b4c20cf2b5585db8c22c59c38d3f8fbed7
https://github.com/scummvm/scummvm/commit/334627b4c20cf2b5585db8c22c59c38d3f8fbed7
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-04T17:02:43-07: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