[Scummvm-git-logs] scummvm master -> 332c18225c6827b03075277004901071320b52b2

athrxx noreply at scummvm.org
Fri Jul 11 21:37:09 UTC 2025


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

Summary:
29f3326b9d KYRA: (LOL) - reduce cpu load in menu
332c18225c SCUMM: fix bug no. 16021


Commit: 29f3326b9dacdd32e51115482545fe890c07179f
    https://github.com/scummvm/scummvm/commit/29f3326b9dacdd32e51115482545fe890c07179f
Author: athrxx (athrxx at scummvm.org)
Date: 2025-07-11T23:35:55+02:00

Commit Message:
KYRA: (LOL) - reduce cpu load in menu

Changed paths:
    engines/kyra/gui/gui_lol.cpp


diff --git a/engines/kyra/gui/gui_lol.cpp b/engines/kyra/gui/gui_lol.cpp
index 144bc9fd3fe..926e60dcc57 100644
--- a/engines/kyra/gui/gui_lol.cpp
+++ b/engines/kyra/gui/gui_lol.cpp
@@ -2406,6 +2406,7 @@ int GUI_LoL::runMenu(Menu &menu) {
 		}
 
 		while (!_newMenu && _displayMenu) {
+			uint32 frameEnd = _vm->_system->getMillis() + 16;
 			processHighlights(*_currentMenu);
 
 			if (_currentMenu == &_savenameMenu) {
@@ -2445,6 +2446,8 @@ int GUI_LoL::runMenu(Menu &menu) {
 
 			if (!_menuResult)
 				_displayMenu = false;
+
+			_vm->delayUntil(frameEnd);
 		}
 
 		if (_newMenu != _currentMenu || !_displayMenu) {


Commit: 332c18225c6827b03075277004901071320b52b2
    https://github.com/scummvm/scummvm/commit/332c18225c6827b03075277004901071320b52b2
Author: athrxx (athrxx at scummvm.org)
Date: 2025-07-11T23:35:57+02:00

Commit Message:
SCUMM: fix bug no. 16021

The relevant code is the same for FT, DIG and COMI,
so I removed a workaround that was limited to COMI.

Changed paths:
    engines/scumm/actor.cpp
    engines/scumm/boxes.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 3895cada77b..1770e4a0bc5 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -2552,7 +2552,6 @@ void Actor::drawActorCostume(bool hitTestMode) {
 
 
 void Actor::prepareDrawActorCostume(BaseCostumeRenderer *bcr) {
-
 	bcr->_actorID = _number;
 	bcr->_actorX = _pos.x - _vm->_virtscr[kMainVirtScreen].xstart;
 	bcr->_actorY = _pos.y - _elevation;
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index cb62b820b3d..88147ccf8d8 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -572,17 +572,30 @@ bool ScummEngine::checkXYInBoxBounds(int boxnum, int x, int y) {
 	// (quadrangle in this case), compute whether p is "left" or "right"
 	// from it.
 
-	if (!compareSlope(box.ul, box.ur, p))
-		return false;
+	if (_game.version >= 7) {
+		if (compareSlope(box.ul, box.ur, p) &&
+			compareSlope(box.ur, box.lr, p) &&
+			compareSlope(box.lr, box.ll, p) &&
+			compareSlope(box.ll, box.ul, p))
+				return true;
+		if (!compareSlope(box.ul, box.ll, p) ||
+			!compareSlope(box.ll, box.lr, p) ||
+			!compareSlope(box.lr, box.ur, p) ||
+			!compareSlope(box.ur, box.ul, p))
+				return false;
+	} else {
+		if (!compareSlope(box.ul, box.ur, p))
+			return false;
 
-	if (!compareSlope(box.ur, box.lr, p))
-		return false;
+		if (!compareSlope(box.ur, box.lr, p))
+			return false;
 
-	if (!compareSlope(box.lr, box.ll, p))
-		return false;
+		if (!compareSlope(box.lr, box.ll, p))
+			return false;
 
-	if (!compareSlope(box.ll, box.ul, p))
-		return false;
+		if (!compareSlope(box.ll, box.ul, p))
+			return false;
+	}
 
 	return true;
 }
@@ -603,20 +616,6 @@ BoxCoords ScummEngine::getBoxCoordinates(int boxnum) {
 		box->lr.x = (short)FROM_LE_32(bp->v8.lrx);
 		box->lr.y = (short)FROM_LE_32(bp->v8.lry);
 
-		// WORKAROUND (see patch #8173): Some walkboxes in CMI appear
-		// to have been flipped, in the sense that for instance the
-		// lower boundary is above the upper one. We work around this
-		// by simply flipping them back.
-
-		if (box->ul.y > box->ll.y && box->ur.y > box->lr.y) {
-			SWAP(box->ul, box->ll);
-			SWAP(box->ur, box->lr);
-		}
-
-		if (box->ul.x > box->ur.x && box->ll.x > box->lr.x) {
-			SWAP(box->ul, box->ur);
-			SWAP(box->ll, box->lr);
-		}
 	} else if (_game.version == 0) {
 		box->ul.x = bp->v0.x1;
 		box->ul.y = bp->v0.y1;




More information about the Scummvm-git-logs mailing list