From 7ea5cefef4fb1ef9db52cbf5df7f884770113684 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 1 Mar 2009 14:45:30 +0000 Subject: LOL: implemented some monster related code (monsters now get placed in the maze, but they still don't do anything) svn-id: r39039 --- engines/kyra/timer_lol.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/kyra/timer_lol.cpp') diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp index ab94d97101..994c691aa8 100644 --- a/engines/kyra/timer_lol.cpp +++ b/engines/kyra/timer_lol.cpp @@ -35,8 +35,8 @@ void LoLEngine::setupTimers() { debugC(9, kDebugLevelMain | kDebugLevelTimer, "LoLEngine::setupTimers()"); _timer->addTimer(0, TimerV2(timerProcessOpenDoor), 15, true); - _timer->addTimer(0x10, TimerV2(timerSub2), 6, true); - _timer->addTimer(0x11, TimerV2(timerSub2), 6, true); + _timer->addTimer(0x10, TimerV2(timerProcessMonsters), 6, true); + _timer->addTimer(0x11, TimerV2(timerProcessMonsters), 6, true); _timer->setNextRun(0x11, 3); _timer->addTimer(3, TimerV2(timerSub3), 15, true); _timer->addTimer(4, TimerV2(timerSub4), 1, true); @@ -58,8 +58,12 @@ void LoLEngine::timerProcessOpenDoor(int timerNum) { } -void LoLEngine::timerSub2(int timerNum) { +void LoLEngine::timerProcessMonsters(int timerNum) { + //if (!_updateMonsters) + // return; + for (int i = timerNum & 0x0f; i < 30; i += 2) + updateMonster(&_monsters[i]); } void LoLEngine::timerSub3(int timerNum) { -- cgit v1.2.3