[Scummvm-git-logs] scummvm master -> 66dbbfb59a7dcc9538c79793adaac08f437a2e1c

OMGPizzaGuy noreply at scummvm.org
Fri Feb 17 04:19:04 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:
66dbbfb59a ULTIMA8: Adjust mouse length & direction offset to be fixed instead of scaled with height.


Commit: 66dbbfb59a7dcc9538c79793adaac08f437a2e1c
    https://github.com/scummvm/scummvm/commit/66dbbfb59a7dcc9538c79793adaac08f437a2e1c
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-02-16T22:18:50-06:00

Commit Message:
ULTIMA8: Adjust mouse length & direction offset to be fixed instead of scaled with height.

Changed paths:
    engines/ultima/ultima8/kernel/mouse.cpp


diff --git a/engines/ultima/ultima8/kernel/mouse.cpp b/engines/ultima/ultima8/kernel/mouse.cpp
index 19aca88d6fe..609afe44fb7 100644
--- a/engines/ultima/ultima8/kernel/mouse.cpp
+++ b/engines/ultima/ultima8/kernel/mouse.cpp
@@ -153,7 +153,7 @@ int Mouse::getMouseLength(int mx, int my) const {
 		return 2;
 
 	// For short cursor, reference point is near the avatar's feet
-	dy = abs((dims.height() / 2 + (dims.height() * 14 / 200)) - my); //! constant
+	dy = abs((dims.height() / 2 + 14) - my); //! constant
 	int xshort = dims.width() * 30 / 320;
 	int yshort = dims.height() * 30 / 320;
 
@@ -170,7 +170,7 @@ Direction Mouse::getMouseDirectionWorld(int mx, int my) const {
 
 	// For now, reference point is (near) the center of the screen
 	int dx = mx - dims.width() / 2;
-	int dy = (dims.height() / 2 + (dims.height() * 14 / 200)) - my; //! constant
+	int dy = (dims.height() / 2 + 14) - my; //! constant
 
 	return Direction_Get(dy * 2, dx, dirmode_8dirs);
 }




More information about the Scummvm-git-logs mailing list