aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2015-08-19 22:47:09 -0400
committerMatthew Hoops2015-08-19 22:47:09 -0400
commitee9929957c3a8aaf5669fa1f078f016568e50ca5 (patch)
tree98c6950ae195efe7b58fb68d475b3d6aba4867ba /engines
parenta402cd31969bf245e9318255c53fde2c92671f7c (diff)
downloadscummvm-rg350-ee9929957c3a8aaf5669fa1f078f016568e50ca5.tar.gz
scummvm-rg350-ee9929957c3a8aaf5669fa1f078f016568e50ca5.tar.bz2
scummvm-rg350-ee9929957c3a8aaf5669fa1f078f016568e50ca5.zip
MOHAWK: Use floor instead of round
round() is C99; floor() and adding 0.5 to the parameter is sufficient. Probably having detection for floor() and a compatibility definition otherwise would make sense.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/riven_external.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 7ca41e253c..00075039fe 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -2611,7 +2611,7 @@ void RivenExternal::xt7600_setupmarbles(uint16 argc, uint16 *argv) {
// (Nothing to draw here)
} else {
// The marble is on the grid and the waffle is up
- int marbleX = (int)round(getMarbleX(var) * yAdjusts[getMarbleY(var)] + xPosOffsets[getMarbleY(var)]);
+ int marbleX = (int)floor(getMarbleX(var) * yAdjusts[getMarbleY(var)] + xPosOffsets[getMarbleY(var)] + 0.5);
int marbleY = yPosOffsets[getMarbleY(var)];
_vm->_gfx->copyImageToScreen(baseBitmapId + i, marbleX, marbleY, marbleX + kSmallMarbleWidth, marbleY + kSmallMarbleHeight);
}