feat(console): add a 'Types' header file

This commit is contained in:
Tristan Cormier 2023-04-08 11:54:34 -04:00
parent 6b4c5e9179
commit 2d0d6a08fb
6 changed files with 51 additions and 17 deletions

View File

@ -1,7 +1,7 @@
#ifndef CONSOLE_C_VAR_HPP
#define CONSOLE_C_VAR_HPP
#include <cstdint>
#include "console/Types.hpp"
#include <common/String.hpp>
#include <storm/Hash.hpp>

View File

@ -1,6 +1,8 @@
#ifndef CONSOLE_CLIENT_HPP
#define CONSOLE_CLIENT_HPP
#include "console/Types.hpp"
void ConsoleInitializeClientCommand();
void ConsoleInitializeClientCVar(const char* a1);

View File

@ -1,8 +1,8 @@
#ifndef CONSOLE_COMMAND_HPP
#define CONSOLE_COMMAND_HPP
#include "console/Types.hpp"
#include <storm/Hash.hpp>
#include <cstdint>
#define EXEC_BUFFER_SIZE 8192
#define CMD_BUFFER_SIZE 1024
@ -10,20 +10,6 @@
#define HISTORY_DEPTH 32
#define NOHELP nullptr
enum CATEGORY {
DEBUG,
GRAPHICS,
CONSOLE,
COMBAT,
GAME,
DEFAULT,
NET,
SOUND,
GM,
NONE,
LAST
};
struct CONSOLECOMMAND : TSHashObject<CONSOLECOMMAND, HASHKEY_STRI> {
const char* command;
int32_t (*handler)(const char*, const char*);

View File

@ -3,7 +3,6 @@
#include "console/CVar.hpp"
#include "event/Input.hpp"
#include "gx/Device.hpp"
#include <cstring>
CVar* s_cvGxMaximize;
CVar* s_cvGxResolution;

View File

@ -1,6 +1,7 @@
#ifndef CONSOLE_DEVICE_HPP
#define CONSOLE_DEVICE_HPP
#include "console/Types.hpp"
#include "gx/CGxFormat.hpp"
struct DefaultSettings {

46
src/console/Types.hpp Normal file
View File

@ -0,0 +1,46 @@
#ifndef CONSOLE_TYPES_HPP
#define CONSOLE_TYPES_HPP
#include <cstdint>
enum CATEGORY {
DEBUG,
GRAPHICS,
CONSOLE,
COMBAT,
GAME,
DEFAULT,
NET,
SOUND,
GM,
NONE,
LAST
};
enum COLOR_T {
DEFAULT_COLOR,
INPUT_COLOR,
ECHO_COLOR,
ERROR_COLOR,
WARNING_COLOR,
GLOBAL_COLOR,
ADMIN_COLOR,
HIGHLIGHT_COLOR,
BACKGROUND_COLOR,
NUM_COLORTYPES
};
enum CONSOLERESIZESTATE {
CS_NONE,
CS_STRETCH,
NUM_CONSOLERESIZESTATES
};
enum HIGHLIGHTSTATE {
HS_NONE,
HS_HIGHLIGHTING,
HS_ENDHIGHLIGHT,
NUM_HIGHLIGHTSTATES
};
#endif