diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/cge.h | 1 | ||||
-rw-r--r-- | engines/cge/cge_main.cpp | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/cge/cge.h b/engines/cge/cge.h index e4bb260bcc..ba6326726a 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -45,6 +45,7 @@ enum { class CGEEngine : public Engine { private: uint32 _lastFrame; + void tick(); public: CGEEngine(OSystem *syst, const ADGameDescription *gameDescription); ~CGEEngine(); diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 33abf7917d..4bb954eaed 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -1537,8 +1537,21 @@ void CGEEngine::mainLoop() { millis = g_system->getMillis(); } _lastFrame = millis; + + // Dispatch the tick to any active objects + tick(); } +void CGEEngine::tick() { + for (Sprite *spr = Vga->ShowQ->First(); spr; spr = spr->_next) { + if (spr->_time) { + if (!spr->_flags._hide) { + if (--spr->_time == 0) + spr->tick(); + } + } + } +} void CGEEngine::loadUser() { // set scene |