aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-19 16:22:59 +0300
committerEugene Sandulenko2016-07-19 16:22:59 +0300
commit52abd69551945dc9dd0bf1bcae2c06171263ad90 (patch)
tree145956201b28241eb05daf9436a36b51ff71bc18 /engines
parent8af6a0ddd2a06e9c3605fa0a6d4f39318738eedc (diff)
downloadscummvm-rg350-52abd69551945dc9dd0bf1bcae2c06171263ad90.tar.gz
scummvm-rg350-52abd69551945dc9dd0bf1bcae2c06171263ad90.tar.bz2
scummvm-rg350-52abd69551945dc9dd0bf1bcae2c06171263ad90.zip
SCUMM: Use more portable rounding function
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/scumm.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 3c617470fe..72c6909f8c 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -732,7 +732,7 @@ ScummEngine_v0::ScummEngine_v0(OSystem *syst, const DetectorResult &dr)
VAR_ACTIVE_OBJECT2 = 0xFF;
VAR_IS_SOUND_RUNNING = 0xFF;
VAR_ACTIVE_VERB = 0xFF;
-
+
DelayReset();
if (strcmp(dr.fp.pattern, "maniacdemo.d64") == 0 )
@@ -749,7 +749,7 @@ void ScummEngine_v0::DelayReset() {
int ScummEngine_v0::DelayCalculateDelta() {
float Time = 0;
-
+
// These values are made up, based on trial/error with visual inspection against WinVice
// If anyone feels inclined, the routines in the original engine could be profiled
// and these values changed accordindly.
@@ -763,7 +763,7 @@ int ScummEngine_v0::DelayCalculateDelta() {
DelayReset();
- return roundf(Time);
+ return floor(Time + 0.5);
}
ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr)
@@ -2118,7 +2118,7 @@ Common::Error ScummEngine::go() {
if (_game.version == 0) {
delta += ((ScummEngine_v0 *)this)->DelayCalculateDelta();
}
-
+
// WORKAROUND: walking speed in the original v1 interpreter
// is sometimes slower (e.g. during scrolling) than in ScummVM.
// This is important for the door-closing action in the dungeon,