From ffbfe8922a3cfa2d2750fca3a2cb2d953fd1e4ca Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 26 Dec 2003 12:58:27 +0000 Subject: new debugging code, using Common::Debugger svn-id: r11940 --- queen/debug.h | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) (limited to 'queen/debug.h') diff --git a/queen/debug.h b/queen/debug.h index 25cf02529d..6dd0f71cbb 100644 --- a/queen/debug.h +++ b/queen/debug.h @@ -22,57 +22,38 @@ #ifndef QUEENDEBUG_H #define QUEENDEBUG_H -#include "common/util.h" +#include "common/debugger.h" namespace Queen { class QueenEngine; -class Debug { +class Debugger : public Common::Debugger { public: - typedef void (Debug::*DebugFunc)(); - Debug(QueenEngine *vm); + Debugger(QueenEngine *vm); - void registerStub(const char *password, DebugFunc debugFunc); + bool _drawAreas; - void update(int c); +protected: - void jumpToRoom(); - void toggleFastMode(); - void printInfo(); - void toggleAreasDrawing(); - void changeGameState(); - void printGameState(); - void giveAllItems(); - - static void digitKeyPressed(void *refCon, int key); - - struct DebugStub { - const char *password; - DebugFunc function; - }; - - enum { - MAX_STUB = 5 - }; + virtual void preEnter(); + virtual void postEnter(); + bool Cmd_Exit(int argc, const char **argv); + bool Cmd_Help(int argc, const char **argv); + bool Cmd_Areas(int argc, const char **argv); + bool Cmd_Asm(int argc, const char **argv); + bool Cmd_GameState(int argc, const char **argv); + bool Cmd_Info(int argc, const char **argv); + bool Cmd_Items(int argc, const char **argv); + bool Cmd_Room(int argc, const char **argv); private: - char _password[16]; - uint _passwordCharCount; - - char _digitText[50]; - uint _digitTextCount; - - DebugStub _stub[MAX_STUB]; - uint _stubCount; - QueenEngine *_vm; }; - } // End of namespace Queen #endif -- cgit v1.2.3