[Scummvm-git-logs] scummvm master -> b36c487112a01a06fd09d973550ab9458fd9ac72
athrxx
noreply at scummvm.org
Tue Aug 22 18:28:09 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:
b36c487112 SCUMM: fix bug no. 14582
Commit: b36c487112a01a06fd09d973550ab9458fd9ac72
https://github.com/scummvm/scummvm/commit/b36c487112a01a06fd09d973550ab9458fd9ac72
Author: athrxx (athrxx at scummvm.org)
Date: 2023-08-22T20:27:48+02:00
Commit Message:
SCUMM: fix bug no. 14582
(pathfinding doesn't match original)
This does not address the (allegedly) wrong actor turning direction.
Changed paths:
engines/scumm/actor.cpp
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index e4b35b53875..5051e767106 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -509,7 +509,13 @@ int Actor::calcMovementFactor(const Common::Point& next) {
deltaYFactor = 0;
}
- if ((uint)ABS(deltaXFactor >> 16) > _speedx) {
+ // We used to have ABS(deltaXFactor >> 16) for the calculation here, which
+ // caused bug no. https://bugs.scummvm.org/ticket/14582
+ // For SCUMM4-6 it is obvious from disam that they do the division by 0x10000.
+ // SCUMM7/8 original code gives the impression of using deltaXFactor >> 16 at
+ // first glance, but it really doesn't. It is a more complicated operation
+ // which amounts to the exact same thing as the following...
+ if ((uint)ABS(deltaXFactor / 0x10000) > _speedx) {
deltaXFactor = _speedx << 16;
if (diffX < 0)
deltaXFactor = -deltaXFactor;
More information about the Scummvm-git-logs
mailing list