diff options
author | Bastien Bouclet | 2016-11-05 14:47:02 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | 22926a1835079f31fa778f2f2eb4e645c451457a (patch) | |
tree | 5c622ae7a0ef933ccfe0abe18aec7f7d3b42542d /engines/mohawk/riven.h | |
parent | efcf38f95f14272efd8ace91747a45bd53c74b57 (diff) | |
download | scummvm-rg350-22926a1835079f31fa778f2f2eb4e645c451457a.tar.gz scummvm-rg350-22926a1835079f31fa778f2f2eb4e645c451457a.tar.bz2 scummvm-rg350-22926a1835079f31fa778f2f2eb4e645c451457a.zip |
MOHAWK: Move the timer callbacks to the stacks
Diffstat (limited to 'engines/mohawk/riven.h')
-rw-r--r-- | engines/mohawk/riven.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 131d28548c..73245e983e 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -107,7 +107,10 @@ public: Common::Error saveGameState(int slot, const Common::String &desc); bool hasFeature(EngineFeature f) const; - typedef void (*TimerProc)(MohawkEngine_Riven *vm); + typedef Common::Functor0<void> TimerProc; + +#define TIMER(cls, method) \ + new Common::Functor0Mem<void, cls>(this, &cls::method) void doVideoTimer(VideoHandle handle, bool force); @@ -131,7 +134,7 @@ private: void initVars(); // Timer - TimerProc _timerProc; + Common::SharedPtr<TimerProc> _timerProc; uint32 _timerTime; // Miscellaneous @@ -165,8 +168,7 @@ public: void delayAndUpdate(uint32 ms); // Timer - void installTimer(TimerProc proc, uint32 time); - void installCardTimer(); + void installTimer(TimerProc *proc, uint32 time); void checkTimer(); void removeTimer(); |