[Scummvm-git-logs] scummvm master -> dd4704ae3f4f719ba449d3bb9ec3ed517643f94a
aquadran
noreply at scummvm.org
Sun Aug 10 13:23:41 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
dd4704ae3f WINTERMUTE: Restore original code. Scripts use such case.
Commit: dd4704ae3f4f719ba449d3bb9ec3ed517643f94a
https://github.com/scummvm/scummvm/commit/dd4704ae3f4f719ba449d3bb9ec3ed517643f94a
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2025-08-10T15:23:37+02:00
Commit Message:
WINTERMUTE: Restore original code. Scripts use such case.
Changed paths:
engines/wintermute/utils/utils.cpp
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index a2355ea69c8..49c8d861e19 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -43,22 +43,9 @@ void BaseUtils::swap(int *a, int *b) {
//////////////////////////////////////////////////////////////////////////
float BaseUtils::normalizeAngle(float angle) {
- float origAngle = angle;
-
- // The original WME engine checked against 360 here, which is an off-by one
- // error, as when normalizing an angle, we expect the number to be between 0
- // and 359 (since 360 is 0). This check has been fixed in ScummVM to 359. If
- // the resulting angle is negative, it will be corrected in the while loop
- // below.
- while (angle > 359) {
+ while (angle > 360) {
angle -= 360;
}
-
- // Report cases where the above off-by-one error might occur
- if (origAngle > 360 && angle < 0) {
- warning("BaseUtils::normalizeAngle: off-by-one error detected while normalizing angle %f to %f", origAngle, angle);
- }
-
while (angle < 0) {
angle += 360;
}
More information about the Scummvm-git-logs
mailing list