[Scummvm-cvs-logs] SF.net SVN: scummvm: [29245] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Oct 21 23:38:23 CEST 2007
Revision: 29245
http://scummvm.svn.sourceforge.net/scummvm/?rev=29245&view=rev
Author: lordhoto
Date: 2007-10-21 14:38:23 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Fixes timers in Kyra1. (Initialized them twice oops...)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v1.cpp
scummvm/trunk/engines/kyra/timer.cpp
Modified: scummvm/trunk/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.cpp 2007-10-21 20:28:50 UTC (rev 29244)
+++ scummvm/trunk/engines/kyra/kyra_v1.cpp 2007-10-21 21:38:23 UTC (rev 29245)
@@ -381,7 +381,6 @@
loadButtonShapes();
initMainButtonList();
loadMainScreen();
- setupTimers();
_screen->loadPalette("PALETTE.COL", _screen->_currentPalette);
// XXX
Modified: scummvm/trunk/engines/kyra/timer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/timer.cpp 2007-10-21 20:28:50 UTC (rev 29244)
+++ scummvm/trunk/engines/kyra/timer.cpp 2007-10-21 21:38:23 UTC (rev 29245)
@@ -73,6 +73,12 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list