aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/cine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cine/cine.cpp')
-rw-r--r--engines/cine/cine.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 9594b42e51..2caf69da6c 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -105,8 +105,22 @@ int CineEngine::go() {
return 0;
}
+int CineEngine::getTimerDelay() const {
+ return (10923000 * _timerDelayMultiplier) / 1193180;
+}
+
+/*! \brief Modify game speed
+ * \param speedChange Negative values slow game down, positive values speed it up, zero does nothing
+ * \return Timer delay multiplier's value after the game speed change
+ */
+int CineEngine::modifyGameSpeed(int speedChange) {
+ // If we want more speed we decrement the timer delay multiplier and vice versa.
+ _timerDelayMultiplier = CLIP(_timerDelayMultiplier - speedChange, 1, 50);
+ return _timerDelayMultiplier;
+}
void CineEngine::initialize() {
+ _timerDelayMultiplier = 12; // Set default speed
setupOpcodes();
initLanguage(g_cine->getLanguage());