mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 09:52:28 +00:00
feat(profile): add more work related to console
This commit is contained in:
parent
08b49c5197
commit
e95eb3354d
49 changed files with 9188 additions and 245 deletions
21
profile/3.3.5a-windows-386/include/console/command.h
Normal file
21
profile/3.3.5a-windows-386/include/console/command.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef CONSOLE_COMMAND_H
|
||||
#define CONSOLE_COMMAND_H
|
||||
|
||||
DECLARE_STRUCT(CONSOLECOMMAND);
|
||||
|
||||
#include "console/types.h"
|
||||
#include "storm/hash.h"
|
||||
|
||||
STORM_TS_HASH(CONSOLECOMMAND, HASHKEY_STRI);
|
||||
|
||||
typedef int32_t (*COMMANDHANDLER)(const char*, const char*);
|
||||
|
||||
// class CONSOLECOMMAND : public TSHashObject<CONSOLECOMMAND, HASHKEY_STRI>
|
||||
struct CONSOLECOMMAND {
|
||||
TSHashObject_CONSOLECOMMAND_HASHKEY_STRI b_base;
|
||||
COMMANDHANDLER m_handler;
|
||||
const char* m_helpText;
|
||||
CATEGORY m_category;
|
||||
};
|
||||
|
||||
#endif
|
||||
24
profile/3.3.5a-windows-386/include/console/line.h
Normal file
24
profile/3.3.5a-windows-386/include/console/line.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef CONSOLE_LINE_H
|
||||
#define CONSOLE_LINE_H
|
||||
|
||||
DECLARE_STRUCT(CONSOLELINE);
|
||||
|
||||
#include "storm/list.h"
|
||||
#include "console/types.h"
|
||||
#include "gx/string.h"
|
||||
|
||||
STORM_TS_LIST(CONSOLELINE);
|
||||
|
||||
// struct CONSOLELINE : TSLinkedNode<CONSOLELINE>
|
||||
struct CONSOLELINE {
|
||||
TSLinkedNode_CONSOLELINE b_base;
|
||||
uint8_t* buffer;
|
||||
uint32_t chars;
|
||||
uint32_t charsalloc;
|
||||
uint32_t inputpos;
|
||||
uint32_t inputstart;
|
||||
COLOR_T colorType;
|
||||
CGxString* fontPointer;
|
||||
};
|
||||
|
||||
#endif
|
||||
51
profile/3.3.5a-windows-386/include/console/types.h
Normal file
51
profile/3.3.5a-windows-386/include/console/types.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#ifndef CONSOLE_TYPES_H
|
||||
#define CONSOLE_TYPES_H
|
||||
|
||||
DECLARE_ENUM(COLOR_T);
|
||||
DECLARE_ENUM(CATEGORY);
|
||||
DECLARE_ENUM(EXECMODE);
|
||||
DECLARE_ENUM(CONSOLERESIZESTATE);
|
||||
|
||||
enum COLOR_T {
|
||||
DEFAULT_COLOR = 0,
|
||||
INPUT_COLOR = 1,
|
||||
ECHO_COLOR = 2,
|
||||
ERROR_COLOR = 3,
|
||||
WARNING_COLOR = 4,
|
||||
GLOBAL_COLOR = 5,
|
||||
ADMIN_COLOR = 6,
|
||||
HIGHLIGHT_COLOR = 7,
|
||||
BACKGROUND_COLOR = 8,
|
||||
NUM_COLORTYPES
|
||||
};
|
||||
|
||||
enum CATEGORY {
|
||||
DEBUG = 0,
|
||||
GRAPHICS = 1,
|
||||
CONSOLE = 2,
|
||||
COMBAT = 3,
|
||||
GAME = 4,
|
||||
DEFAULT = 5,
|
||||
NET = 6,
|
||||
SOUND = 7,
|
||||
GM = 8,
|
||||
NONE = 9,
|
||||
LAST
|
||||
};
|
||||
|
||||
enum EXECMODE {
|
||||
EM_PROMPTOVERWRITE = 0,
|
||||
EM_RECORDING = 1,
|
||||
EM_APPEND = 2,
|
||||
EM_WRITEFILE = 3,
|
||||
EM_NOTACTIVE = 4,
|
||||
EM_NUM_EXECMODES
|
||||
};
|
||||
|
||||
enum CONSOLERESIZESTATE {
|
||||
CS_NONE = 0,
|
||||
CS_STRETCH = 1,
|
||||
NUM_CONSOLERESIZESTATES
|
||||
};
|
||||
|
||||
#endif
|
||||
28
profile/3.3.5a-windows-386/include/console/var.h
Normal file
28
profile/3.3.5a-windows-386/include/console/var.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef CONSOLE_VAR_H
|
||||
#define CONSOLE_VAR_H
|
||||
|
||||
DECLARE_STRUCT(CVar);
|
||||
|
||||
#include "common/rcstring.h"
|
||||
#include "storm/hash.h"
|
||||
|
||||
STORM_TS_HASH(CVar, HASHKEY_STRI);
|
||||
|
||||
// class CVar : public TSHashObject<CVar, HASHKEY_STRI>
|
||||
struct CVar {
|
||||
TSHashObject_CVar_HASHKEY_STRI b_base;
|
||||
uint32_t m_category;
|
||||
uint32_t m_flags;
|
||||
RCString m_stringValue;
|
||||
float m_floatValue;
|
||||
int32_t m_intValue;
|
||||
int32_t m_modified;
|
||||
RCString m_defaultValue;
|
||||
RCString m_resetValue;
|
||||
RCString m_latchedValue;
|
||||
RCString m_help;
|
||||
bool (*m_callback)(CVar*, const char*, const char*, void*);
|
||||
void* m_arg;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue