aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-01 22:44:22 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commitea303ab682c9d8167f827e0a84cc72336ce2cc42 (patch)
tree0366282afbe39ae2dca88be92c50b7d848a71ed1 /engines/mohawk/riven.cpp
parentee70244fbfb981fc16c77b10bab6546cf5e5cb0d (diff)
downloadscummvm-rg350-ea303ab682c9d8167f827e0a84cc72336ce2cc42.tar.gz
scummvm-rg350-ea303ab682c9d8167f827e0a84cc72336ce2cc42.tar.bz2
scummvm-rg350-ea303ab682c9d8167f827e0a84cc72336ce2cc42.zip
MOHAWK: Switch timers to script commands
Diffstat (limited to 'engines/mohawk/riven.cpp')
-rw-r--r--engines/mohawk/riven.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 9307081254..7a8119f762 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -72,8 +72,6 @@ MohawkEngine_Riven::MohawkEngine_Riven(OSystem *syst, const MohawkGameDescriptio
DebugMan.addDebugChannel(kRivenDebugScript, "Script", "Track Script Execution");
- removeTimer();
-
// NOTE: We can never really support CD swapping. All of the music files
// (*_Sounds.mhk) are stored on disc 1. They are copied to the hard drive
// during install and used from there. The same goes for the extras.mhk
@@ -195,7 +193,6 @@ Common::Error MohawkEngine_Riven::run() {
void MohawkEngine_Riven::doFrame() {
// Update background running things
- checkTimer();
_sound->updateSLST();
_video->updateMovies();
@@ -425,7 +422,7 @@ void MohawkEngine_Riven::changeToCard(uint16 dest) {
void MohawkEngine_Riven::refreshCard() {
// Clear any timer still floating around
- removeTimer();
+ _stack->removeTimer();
_card->enter(true);
@@ -471,27 +468,6 @@ Common::Error MohawkEngine_Riven::saveGameState(int slot, const Common::String &
return _saveLoad->saveGame(slot, desc);
}
-void MohawkEngine_Riven::installTimer(TimerProc *proc, uint32 time) {
- removeTimer();
- _timerProc = Common::SharedPtr<TimerProc>(proc);
- _timerTime = time + getTotalPlayTime();
-}
-
-void MohawkEngine_Riven::checkTimer() {
- if (!_timerProc)
- return;
-
- // NOTE: If the specified timer function is called, it is its job to remove the timer!
- if (getTotalPlayTime() >= _timerTime) {
- (*_timerProc)();
- }
-}
-
-void MohawkEngine_Riven::removeTimer() {
- _timerProc.reset();
- _timerTime = 0;
-}
-
void MohawkEngine_Riven::addZipVisitedCard(uint16 cardId, uint16 cardNameId) {
Common::String cardName = getStack()->getName(kCardNames, cardNameId);
if (cardName.empty())