diff options
author | Johannes Schickel | 2007-07-29 16:33:11 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-07-29 16:33:11 +0000 |
commit | 1140fca82e79121ad2a154dc98b1637c8d56d55d (patch) | |
tree | 409ae64e02fef57ada9489f652c6e6f40762102a /engines/kyra/debugger.cpp | |
parent | 076d6b1bc1c4f62732ff46a0931c6bc28ef9a08f (diff) | |
download | scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.tar.gz scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.tar.bz2 scummvm-rg350-1140fca82e79121ad2a154dc98b1637c8d56d55d.zip |
- Kyrandia 1 works again
- Added timer class for timer handling
- Little bit more resturcturing
- A little bit (almost nothing but a start!) Kyrandia 2 support
svn-id: r28297
Diffstat (limited to 'engines/kyra/debugger.cpp')
-rw-r--r-- | engines/kyra/debugger.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 0a1974c3f4..152dc21c61 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -29,6 +29,7 @@ #include "kyra/debugger.h" #include "kyra/kyra_v1.h" #include "kyra/screen.h" +#include "kyra/timer.h" namespace Kyra { @@ -141,8 +142,8 @@ bool Debugger_v1::cmd_queryFlag(int argc, const char **argv) { } bool Debugger_v1::cmd_listTimers(int argc, const char **argv) { - for (int i = 0; i < ARRAYSIZE(_vm->_timers); i++) - DebugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i\n", i, _vm->_timers[i].active ? "Yes" : "No", _vm->_timers[i].countdown); + for (int i = 0; i < _vm->timer()->count(); i++) + DebugPrintf("Timer %-2i: Active: %-3s Countdown: %-6i\n", i, _vm->timer()->isEnabled(i) ? "Yes" : "No", _vm->timer()->getDelay(i)); return true; } @@ -151,8 +152,8 @@ bool Debugger_v1::cmd_setTimerCountdown(int argc, const char **argv) { if (argc > 2) { uint timer = atoi(argv[1]); uint countdown = atoi(argv[2]); - _vm->setTimerCountdown(timer, countdown); - DebugPrintf("Timer %i now has countdown %i\n", timer, _vm->_timers[timer].countdown); + _vm->timer()->setCountdown(timer, countdown); + DebugPrintf("Timer %i now has countdown %i\n", timer, _vm->timer()->getDelay(timer)); } else { DebugPrintf("Syntax: settimercountdown <timer> <countdown>\n"); } |