aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/engine.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-08-20 16:35:20 +0000
committerArnaud Boutonné2010-08-20 16:35:20 +0000
commite81eab613374655022a592a055e7afe106765147 (patch)
treed78b2dedd9834b7d039f58762e32cc4e9d85a0f6 /engines/hugo/engine.cpp
parent53bf93a8847c47f983a3ee25bffa8f6072ad82d4 (diff)
downloadscummvm-rg350-e81eab613374655022a592a055e7afe106765147.tar.gz
scummvm-rg350-e81eab613374655022a592a055e7afe106765147.tar.bz2
scummvm-rg350-e81eab613374655022a592a055e7afe106765147.zip
Hugo : Style - Add parenthesis around condition when conditional operator is used, as mentioned in Code Formatting Conventions
svn-id: r52230
Diffstat (limited to 'engines/hugo/engine.cpp')
-rw-r--r--engines/hugo/engine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/hugo/engine.cpp b/engines/hugo/engine.cpp
index 59b2e0d9ee..967d75e663 100644
--- a/engines/hugo/engine.cpp
+++ b/engines/hugo/engine.cpp
@@ -262,11 +262,11 @@ void HugoEngine::moveObjects() {
if (abs(dx) <= radius)
obj->vx = 0;
else
- obj->vx = dx > 0 ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath);
+ obj->vx = (dx > 0) ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath);
if (abs(dy) <= radius)
obj->vy = 0;
else
- obj->vy = dy > 0 ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath);
+ obj->vy = (dy > 0) ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath);
// Set first image in sequence (if multi-seq object)
switch (obj->seqNumb) {
@@ -467,7 +467,7 @@ int HugoEngine::deltaY(int x1, int x2, int vy, int y) {
if (vy == 0)
return(0); // Object stationary
- inc = (vy > 0 ? 1 : -1);
+ inc = (vy > 0) ? 1 : -1;
for (j = y + inc; j != (y + vy + inc); j += inc) //Search by byte
for (i = x1 >> 3; i <= x2 >> 3; i++)
if ((b = _boundary[j * XBYTES + i] | _objBound[j * XBYTES + i]) != 0) { // Any bit set