aboutsummaryrefslogtreecommitdiff
path: root/saga/console.h
diff options
context:
space:
mode:
Diffstat (limited to 'saga/console.h')
-rw-r--r--saga/console.h92
1 files changed, 26 insertions, 66 deletions
diff --git a/saga/console.h b/saga/console.h
index c6b99c2a7e..ad522a7af3 100644
--- a/saga/console.h
+++ b/saga/console.h
@@ -26,83 +26,43 @@
#ifndef SAGA_CONSOLE_H_
#define SAGA_CONSOLE_H_
-namespace Saga {
-
-#define CON_INPUTBUF_LEN 80
-
-#define CONSOLE_BGCOLOR 0x00A0A0A0UL
-#define CONSOLE_TXTCOLOR 0x00FFFFFFUL
-#define CONSOLE_TXTSHADOW 0x00202020UL
-
-struct CONSOLE_LINE {
- CONSOLE_LINE *next;
- CONSOLE_LINE *prev;
- char *str_p;
- int str_len;
-};
+#include "common/debugger.h"
-struct CON_SCROLLBACK {
- CONSOLE_LINE *head;
- CONSOLE_LINE *tail;
- int lines;
-};
+namespace Saga {
-#define CON_DEFAULTPOS 136
-#define CON_DEFAULTLINES 100
-#define CON_DEFAULTCMDS 10
-#define CON_DROPTIME 400
-#define CON_PRINTFLIMIT 1024
-#define CON_LINE_H 10
-#define CON_INPUT_H 10
-
-class Console {
- public:
- int reg(void);
+class Console : public Common::Debugger<Console> {
+public:
Console(SagaEngine *vm);
~Console(void);
- int activate(void);
- int deactivate(void);
- bool isActive(void);
+protected:
+ virtual void preEnter();
+ virtual void postEnter();
- int type(int in_char);
- int draw(SURFACE *ds);
- int print(const char *fmt_str, ...);
+private:
+ bool Cmd_Exit(int argc, const char **argv);
+ bool Cmd_Help(int argc, const char **argv);
- int cmdUp(void);
- int cmdDown(void);
- int pageUp(void);
- int pageDown(void);
+ bool Cmd_ActorAdd(int argc, const char **argv);
+ bool Cmd_ActorDel(int argc, const char **argv);
+ bool Cmd_ActorMove(int argc, const char **argv);
+ bool Cmd_ActorMoveRel(int argc, const char **argv);
+ bool Cmd_ActorSetO(int argc, const char **argv);
+ bool Cmd_ActorSetAct(int argc, const char **argv);
- int dropConsole(double percent);
- int raiseConsole(double percent);
+ bool Cmd_AnimInfo(int argc, const char **argv);
- private:
- int addLine(CON_SCROLLBACK *scroll, int line_max, const char *constr_p);
- int deleteLine(CON_SCROLLBACK *scroll);
- int deleteScroll(CON_SCROLLBACK *scroll);
- int setDropPos(double percent);
+ bool Cmd_SceneChange(int argc, const char **argv);
+ bool Cmd_SceneInfo(int argc, const char **argv);
+ bool Cmd_ActionInfo(int argc, const char **argv);
+ bool Cmd_ObjectInfo(int argc, const char **argv);
- private:
- SagaEngine *_vm;
+ bool Cmd_ScriptInfo(int argc, const char **argv);
+ bool Cmd_ScriptExec(int argc, const char **argv);
+ bool Cmd_ScriptToggleStep(int argc, const char **argv);
- CON_SCROLLBACK _scrollback;
- CON_SCROLLBACK _history;
-
- int _resize;
- int _droptime;
-
- bool _active;
- int _yMax;
- int _lineMax;
- int _histMax;
- int _histPos;
- int _linePos;
- int _yPos;
- char *_prompt;
- int _promptW;
- char _inputBuf[CON_INPUTBUF_LEN + 1];
- int _inputPos;
+private:
+ SagaEngine *_vm;
};
} // End of namespace Saga