diff options
author | Le Philousophe | 2019-03-09 00:35:41 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | 92a306e56ea52e8601f71ce966e7851ae80f5157 (patch) | |
tree | 8c3d2820aa6c1af4bb6b02d7be6045b94ba42730 /engines/cryomni3d/versailles/engine.cpp | |
parent | f50d89841d324c66a0ba01d41564b54921ea1840 (diff) | |
download | scummvm-rg350-92a306e56ea52e8601f71ce966e7851ae80f5157.tar.gz scummvm-rg350-92a306e56ea52e8601f71ce966e7851ae80f5157.tar.bz2 scummvm-rg350-92a306e56ea52e8601f71ce966e7851ae80f5157.zip |
CRYOMNI3D: Remove long delayMillis as they lower the framerate
Diffstat (limited to 'engines/cryomni3d/versailles/engine.cpp')
-rw-r--r-- | engines/cryomni3d/versailles/engine.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index 912425a74a..3192aa6182 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -1099,6 +1099,9 @@ int CryOmni3DEngine_Versailles::handleWarp() { xDelta >>= -_omni3dSpeed; yDelta >>= -_omni3dSpeed; } + // This correction factor is to slow down movements for modern CPUs + xDelta /= 5; + yDelta /= 5; leftButtonPressed = (getCurrentMouseButton() == 1); Common::Point mouseRev = _omni3dMan.mapMouseCoords(mouse); @@ -1149,9 +1152,6 @@ int CryOmni3DEngine_Versailles::handleWarp() { g_system->updateScreen(); } } - if (!exit && !leftButtonPressed) { - g_system->delayMillis(50); - } } g_system->showMouse(false); return actionId; @@ -1225,15 +1225,17 @@ void CryOmni3DEngine_Versailles::animateWarpTransition(const Transition *transit } else if (deltaAlpha < 0) { deltaAlpha += 2.*M_PI; } + + // We devide by 5 to slow down movement for modern CPUs int deltaAlphaI; if (deltaAlpha < M_PI) { - deltaAlphaI = -(deltaAlpha * 512.); + deltaAlphaI = -(deltaAlpha * 512. / 5.); } else { - deltaAlphaI = (2.*M_PI - deltaAlpha) * 512.; + deltaAlphaI = (2.*M_PI - deltaAlpha) * 512. / 5.; } double deltaBeta = -srcBeta - _omni3dMan.getBeta(); - int deltaBetaI = -(deltaBeta * 512.); + int deltaBetaI = -(deltaBeta * 512. / 5.); if (_omni3dSpeed > 0) { deltaAlphaI <<= 2; @@ -1259,10 +1261,6 @@ void CryOmni3DEngine_Versailles::animateWarpTransition(const Transition *transit if (pollEvents() && checkKeysPressed(2, Common::KEYCODE_ESCAPE, Common::KEYCODE_SPACE)) { exit = true; } - - if (!exit) { - g_system->delayMillis(50); - } } } |