From ee9929957c3a8aaf5669fa1f078f016568e50ca5 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 19 Aug 2015 22:47:09 -0400 Subject: 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. --- engines/mohawk/riven_external.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/mohawk') 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); } -- cgit v1.2.3