[Scummvm-git-logs] scummvm master -> 430844ba632915835277b5cb3b8ffc8adb2ccd23

athrxx noreply at scummvm.org
Wed Jul 24 21:45:31 UTC 2024


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

Summary:
65af75f079 SCUMM : (V1/2) - minor Hercules mouse precision improvement
3353aa7f89 SCUMM: (V1/V2) - fix minor mouse precision glitch
430844ba63 SCUMM: (MM) -  fix bug no. 15276


Commit: 65af75f07985f8a7b234b774807a9e650007285d
    https://github.com/scummvm/scummvm/commit/65af75f07985f8a7b234b774807a9e650007285d
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-24T23:27:45+02:00

Commit Message:
SCUMM : (V1/2) - minor Hercules mouse precision improvement

Changed paths:
    engines/scumm/input.cpp


diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index fe07fc49502..6aeb9dc3a0f 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -235,10 +235,10 @@ void ScummEngine::parseEvent(Common::Event event) {
 			_mouse.x >>= 1;
 			if (_game.version < 3) {
 				// MM/ZAK v1/v2
-				if (_mouse.y >= _virtscr[kMainVirtScreen].topline)
-					_mouse.y = _mouse.y / 2 + _virtscr[kMainVirtScreen].topline / 2;
-				if (_mouse.y > _virtscr[kVerbVirtScreen].topline)
-					_mouse.y += (_mouse.y - _virtscr[kVerbVirtScreen].topline);
+				if (_mouse.y >= (_virtscr[kVerbVirtScreen].topline - _virtscr[kMainVirtScreen].topline) * 2 + _virtscr[kMainVirtScreen].topline)
+					_mouse.y -= (_virtscr[kVerbVirtScreen].topline - _virtscr[kMainVirtScreen].topline);
+				else if (_mouse.y >= _virtscr[kMainVirtScreen].topline)
+					_mouse.y = (_mouse.y - _virtscr[kMainVirtScreen].topline) / 2 + _virtscr[kMainVirtScreen].topline;
 			} else {
 				// MI1
 				_mouse.y = _mouse.y * 4 / 7;


Commit: 3353aa7f8952034b695cd2de8c2ea494f0c22127
    https://github.com/scummvm/scummvm/commit/3353aa7f8952034b695cd2de8c2ea494f0c22127
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-24T23:30:46+02:00

Commit Message:
SCUMM: (V1/V2) - fix minor mouse precision glitch

Inventory click y-detection was off by one pixel.

Changed paths:
    engines/scumm/verbs.cpp


diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index a20e6bc0e92..9f403c329ae 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -729,7 +729,7 @@ void ScummEngine_v2::checkExecVerbs() {
 		if (zone->number == kVerbVirtScreen && _mouse.y <= zone->topline + 8) {
 			// Click into V2 sentence line
 			runInputScript(kSentenceClickArea, 0, 0);
-		} else if (zone->number == kVerbVirtScreen && _mouse.y > zone->topline + inventoryArea) {
+		} else if (zone->number == kVerbVirtScreen && _mouse.y >= zone->topline + inventoryArea) {
 			// Click into V2 inventory
 			int object = checkV2Inventory(_mouse.x, _mouse.y);
 			if (object > 0)


Commit: 430844ba632915835277b5cb3b8ffc8adb2ccd23
    https://github.com/scummvm/scummvm/commit/430844ba632915835277b5cb3b8ffc8adb2ccd23
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-24T23:36:08+02:00

Commit Message:
SCUMM: (MM) -  fix bug no. 15276

("Highlighting of verbs wrong in v2 when hovering next to verb")

Changed paths:
    engines/scumm/verbs.cpp


diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 9f403c329ae..6af7dbbf862 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -1133,7 +1133,7 @@ void ScummEngine::drawVerb(int verb, int mode) {
 
 		if (isRtl)
 			vs->curRect.left = _charset->_str.left;
-		vs->curRect.right = _charset->_str.right;
+		vs->curRect.right = (_game.version <= 2) ? MIN<int>(vs->curRect.left + (getResourceSize(rtVerb, verb) - 1) * 8, _screenWidth) : _charset->_str.right;
 		vs->curRect.bottom = _charset->_str.bottom;
 		vs->oldRect = _charset->_str;
 		_charset->_str.left = _charset->_str.right;




More information about the Scummvm-git-logs mailing list