[Scummvm-git-logs] scummvm master -> 905ee7665496c5186c862085bb44fe720eefb5b3

athrxx noreply at scummvm.org
Fri Jul 5 12:09:34 UTC 2024


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:
905ee76654 SCI: minor mouse precision fix for Hercules mode


Commit: 905ee7665496c5186c862085bb44fe720eefb5b3
    https://github.com/scummvm/scummvm/commit/905ee7665496c5186c862085bb44fe720eefb5b3
Author: athrxx (athrxx at scummvm.org)
Date: 2024-07-05T14:08:57+02:00

Commit Message:
SCI: minor mouse precision fix for Hercules mode

The translation of the mouse coords shoud now mirror the scaling of the
graphics more precisely. The change is too minor to notice ingame, though.

Changed paths:
    engines/sci/graphics/gfxdrivers.cpp


diff --git a/engines/sci/graphics/gfxdrivers.cpp b/engines/sci/graphics/gfxdrivers.cpp
index 1747143a8bf..0eb323ffbdc 100644
--- a/engines/sci/graphics/gfxdrivers.cpp
+++ b/engines/sci/graphics/gfxdrivers.cpp
@@ -473,13 +473,13 @@ void SCI0_HerculesDriver::replaceCursor(const void *cursor, uint w, uint h, int
 		}
 	}
 
-	CursorMan.replaceCursor(_compositeBuffer, w << 1, h * 3 / 2, hotspotX << 1, hotspotY * 3 / 2, keycolor);
+	CursorMan.replaceCursor(_compositeBuffer, w << 1, (h & ~1) * 3 / 2 + (h & 1), hotspotX << 1, (hotspotY & ~1) * 3 / 2 + (hotspotY & 1), keycolor);
 }
 
 Common::Point SCI0_HerculesDriver::getMousePos() const {
 	Common::Point res = GfxDriver::getMousePos();
 	res.x = CLIP<int>(res.x - _centerX, 0, 639) >> 1;
-	res.y = CLIP<int>(res.y - _centerY, 0, 299) * 2 / 3;
+	res.y = (CLIP<int>(res.y - _centerY, 0, 299) * 2 + 1) / 3;
 	return res;
 }
 




More information about the Scummvm-git-logs mailing list