Fixes timers in Kyra1. (Initialized them twice oops...)

svn-id: r29245
This commit is contained in:
Johannes Schickel 2007-10-21 21:38:23 +00:00
parent 00f349a52f
commit 80045e9661
2 changed files with 6 additions and 1 deletions

View File

@ -381,7 +381,6 @@ void KyraEngine_v1::startup() {
loadButtonShapes();
initMainButtonList();
loadMainScreen();
setupTimers();
_screen->loadPalette("PALETTE.COL", _screen->_currentPalette);
// XXX

View File

@ -73,6 +73,12 @@ void TimerManager::reset() {
void TimerManager::addTimer(uint8 id, TimerFunc *func, int countdown, bool enabled) {
debugC(9, kDebugLevelTimer, "TimerManager::addTimer(%d, %p, %d, %d)", id, (const void*)func, countdown, enabled);
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
if (timer != _timers.end()) {
warning("Adding allready existing timer %d", id);
return;
}
TimerEntry newTimer;
newTimer.id = id;