[Scummvm-git-logs] scummvm master -> 8b78da3723777f84a1f35e89db25cc2903f0ba4a

athrxx athrxx at scummvm.org
Thu Jul 29 20:46:25 UTC 2021


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:
8b78da3723 SCUMM: FT: Fix softlock on negative walk destination


Commit: 8b78da3723777f84a1f35e89db25cc2903f0ba4a
    https://github.com/scummvm/scummvm/commit/8b78da3723777f84a1f35e89db25cc2903f0ba4a
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2021-07-29T22:46:22+02:00

Commit Message:
SCUMM: FT: Fix softlock on negative walk destination

Changed paths:
    engines/scumm/actor.cpp


diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 6dc5ca1f4d..89bab96141 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -604,13 +604,13 @@ int Actor::actorWalkStep() {
 			_walkdata.yfrac -= _v3stepThreshold;
 		}
 	} else {
-		tmpX = (_pos.x * (1 << 16)) + _walkdata.xfrac + (_walkdata.deltaXFactor / 256) * _scalex;
+		tmpX = (_pos.x << 16) + _walkdata.xfrac + (_walkdata.deltaXFactor >> 8) * _scalex;
 		_walkdata.xfrac = (uint16)tmpX;
-		_pos.x = (tmpX / (1 << 16));
+		_pos.x = (tmpX >> 16);
 
-		tmpY = (_pos.y * (1 << 16)) + _walkdata.yfrac + (_walkdata.deltaYFactor / 256) * _scaley;
+		tmpY = (_pos.y << 16) + _walkdata.yfrac + (_walkdata.deltaYFactor >> 8) * _scaley;
 		_walkdata.yfrac = (uint16)tmpY;
-		_pos.y = (tmpY / (1 << 16));
+		_pos.y = (tmpY >> 16);
 	}
 
 	if (ABS(_pos.x - _walkdata.cur.x) > distX) {




More information about the Scummvm-git-logs mailing list