[Scummvm-git-logs] scummvm master -> 5300cc6d0a48877e9819957d2e4b656de04cdef9
digitall
noreply at scummvm.org
Mon May 22 21:59:33 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:
5300cc6d0a WATCHMAKER: Fix Sequence Point GCC Compiler Warning
Commit: 5300cc6d0a48877e9819957d2e4b656de04cdef9
https://github.com/scummvm/scummvm/commit/5300cc6d0a48877e9819957d2e4b656de04cdef9
Author: D G Turner (digitall at scummvm.org)
Date: 2023-05-22T22:56:43+01:00
Commit Message:
WATCHMAKER: Fix Sequence Point GCC Compiler Warning
This should be checked for the correct logic, as I am unsure if this
code sequence is the intended one. However, this is better than code
with sequence point ambiguity.
Changed paths:
engines/watchmaker/walk/act.cpp
diff --git a/engines/watchmaker/walk/act.cpp b/engines/watchmaker/walk/act.cpp
index 1b4b513d83f..76a56abfda2 100644
--- a/engines/watchmaker/walk/act.cpp
+++ b/engines/watchmaker/walk/act.cpp
@@ -492,15 +492,19 @@ void BuildStepList(int32 oc, uint8 dp, uint8 back) {
w->WalkSteps[w->NumSteps++].curp = w->CurPanel;
// arrotonda la fine
- if ((w->NumSteps > 2) && ((angle = lastangle) != (lastangle = w->WalkSteps[w->NumSteps - 2].Angle))) {
- approx = angle - lastangle;
- if (approx > T3D_PI) approx = -T3D_PI * 2 + approx;
- else if (approx < -T3D_PI) approx = T3D_PI * 2 + approx;
- approx /= 4.0f;
-
- if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 1.0f;
- if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 2.0f;
- if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 3.0f;
+ if ((w->NumSteps > 2)) {
+ angle = lastangle;
+ lastangle = w->WalkSteps[w->NumSteps - 2].Angle;
+ if (angle != lastangle) {
+ approx = angle - lastangle;
+ if (approx > T3D_PI) approx = -T3D_PI * 2 + approx;
+ else if (approx < -T3D_PI) approx = T3D_PI * 2 + approx;
+ approx /= 4.0f;
+
+ if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 1.0f;
+ if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 2.0f;
+ if (--LastStep > 0) w->WalkSteps[LastStep].Angle = angle - approx * 3.0f;
+ }
}
if (LastStep < 0) LastStep = 0;
lastangle = w->WalkSteps[0].Angle;
More information about the Scummvm-git-logs
mailing list