diff options
Diffstat (limited to 'engines/cge/cge_main.cpp')
-rw-r--r-- | engines/cge/cge_main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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 |