diff options
author | Matthew Hoops | 2015-08-19 22:47:09 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-08-19 22:47:09 -0400 |
commit | ee9929957c3a8aaf5669fa1f078f016568e50ca5 (patch) | |
tree | 98c6950ae195efe7b58fb68d475b3d6aba4867ba /engines/mohawk/riven_external.cpp | |
parent | a402cd31969bf245e9318255c53fde2c92671f7c (diff) | |
download | scummvm-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/mohawk/riven_external.cpp')
-rw-r--r-- | engines/mohawk/riven_external.cpp | 2 |
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); } |