[Scummvm-cvs-logs] scummvm master -> ee9929957c3a8aaf5669fa1f078f016568e50ca5

clone2727 clone2727 at gmail.com
Thu Aug 20 04:49:34 CEST 2015


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:
ee9929957c MOHAWK: Use floor instead of round


Commit: ee9929957c3a8aaf5669fa1f078f016568e50ca5
    https://github.com/scummvm/scummvm/commit/ee9929957c3a8aaf5669fa1f078f016568e50ca5
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2015-08-19T22:47:09-04:00

Commit Message:
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.

Changed paths:
    engines/mohawk/riven_external.cpp



diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 7ca41e25..0007503 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);
 		}






More information about the Scummvm-git-logs mailing list