mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
CGE: Implemented code for game tick
This commit is contained in:
parent
4116189395
commit
ecad39e246
@ -45,6 +45,7 @@ enum {
|
||||
class CGEEngine : public Engine {
|
||||
private:
|
||||
uint32 _lastFrame;
|
||||
void tick();
|
||||
public:
|
||||
CGEEngine(OSystem *syst, const ADGameDescription *gameDescription);
|
||||
~CGEEngine();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user