[Scummvm-git-logs] scummvm master -> 8174f48ea9c3c819a66e83e57cd90db1639c220a

sdelamarre noreply at scummvm.org
Mon Apr 10 14:53:10 UTC 2023


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:
8174f48ea9 GOB: workaround for a crash in some Adibou1 "find matching cards" games


Commit: 8174f48ea9c3c819a66e83e57cd90db1639c220a
    https://github.com/scummvm/scummvm/commit/8174f48ea9c3c819a66e83e57cd90db1639c220a
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-04-10T16:52:59+02:00

Commit Message:
GOB: workaround for a crash in some Adibou1 "find matching cards" games

Changed paths:
    engines/gob/hotspots.cpp


diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index bcc8100b3c5..df088650f88 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -1271,6 +1271,17 @@ void Hotspots::evaluateNew(uint16 i, uint16 *ids, InputDesc *inputs,
 	}
 	type &= 0x7F;
 
+	if (_vm->getGameType() == kGameTypeAdibou1 &&
+		left == 0xFFFF - 5 &&
+		(_vm->isCurrentTot("L61EXO-7.tot") || _vm->isCurrentTot("L61EXO-9.tot"))) {
+		// WORKAROUND: In those "find matching cards" games, hotspots of cards already found
+		// are normally removed by setting their x coordinate to 0xFFFF. However, sometimes
+		// the hotspot pos() function subtracts an additional 5 from x, which results in the
+		// hotspot not being properly removed (and clicking on it leads to a crash).
+		// TODO: the original executable somehow avoids this problem.
+		left = 0xFFFF;
+	}
+
 	// Draw a border around the hotspot
 	if (_vm->_draw->_renderFlags & RENDERFLAG_BORDERHOTSPOTS) {
 		Surface &surface = *_vm->_draw->_spritesArray[_vm->_draw->_destSurface];




More information about the Scummvm-git-logs mailing list