mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(console): hardware detection et cetera
This commit is contained in:
parent
97bbe2ea66
commit
31f215ea14
118 changed files with 4059 additions and 1931 deletions
|
|
@ -2,67 +2,43 @@
|
|||
#define CONSOLE_COMMAND_HPP
|
||||
|
||||
#include "console/Types.hpp"
|
||||
|
||||
#include <storm/Hash.hpp>
|
||||
#include <cstdint>
|
||||
#include <storm/Hash.hpp>
|
||||
|
||||
#define CONSOLE_REGISTER_LIST(category, list) RegisterConsoleCommandList(category, list, sizeof(list) / sizeof(ConsoleCommandList))
|
||||
#define CONSOLE_COMMAND_EXEC_BUFFER_SIZE 8192
|
||||
#define CONSOLE_COMMAND_BUFFER_SIZE 1024
|
||||
#define CONSOLE_COMMAND_MAX_LENGTH 64
|
||||
#define CONSOLE_COMMAND_HISTORY_DEPTH 32
|
||||
|
||||
#define CONSOLE_EXEC_BUFFER_SIZE 8192
|
||||
#define CONSOLE_CMD_BUFFER_SIZE 1024
|
||||
#define CONSOLE_MAX_CMD_LENGTH 64
|
||||
#define CONSOLE_HISTORY_DEPTH 32
|
||||
#define CONSOLE_NOHELP nullptr
|
||||
class CONSOLECOMMAND : public TSHashObject<CONSOLECOMMAND, HASHKEY_STRI> {
|
||||
public:
|
||||
COMMANDHANDLER m_handler;
|
||||
const char* m_helpText;
|
||||
CATEGORY m_category;
|
||||
};
|
||||
|
||||
extern int32_t s_completionMode;
|
||||
extern const char* s_completedCmd;
|
||||
extern char s_partial[256];
|
||||
extern char s_repeatBuffer[64];
|
||||
extern uint32_t s_repeatCount;
|
||||
|
||||
extern TSHashTable<CONSOLECOMMAND, HASHKEY_STRI> g_consoleCommandHash;
|
||||
extern char g_commandHistory[CONSOLE_HISTORY_DEPTH][CONSOLE_CMD_BUFFER_SIZE];
|
||||
extern uint32_t g_commandHistoryIndex;
|
||||
extern char g_ExecBuffer[CONSOLE_EXEC_BUFFER_SIZE];
|
||||
|
||||
void ConsoleCommandDestroy();
|
||||
void ConsoleCommandInitialize();
|
||||
|
||||
char* ConsoleCommandHistory(uint32_t index);
|
||||
const char* ConsoleCommandHistory(uint32_t index);
|
||||
|
||||
uint32_t ConsoleCommandHistoryDepth();
|
||||
|
||||
int32_t ConsoleCommandRegister(const char* command, COMMANDHANDLER handler, CATEGORY category, const char* helpText);
|
||||
|
||||
void ConsoleCommandInitialize();
|
||||
|
||||
void ConsoleInitializeCommonCommand();
|
||||
|
||||
void ConsoleInitializeDebugCommand();
|
||||
|
||||
void ConsoleInitializeScreenCommand();
|
||||
|
||||
void RegisterConsoleCommandList(CATEGORY category, ConsoleCommandList list[], size_t count);
|
||||
|
||||
void ConsoleCommandUnregister(const char* command);
|
||||
|
||||
void ConsoleCommandExecute(char* commandLine, int32_t addToHistory);
|
||||
|
||||
void MakeCommandCurrent(CONSOLELINE* lineptr, char* command);
|
||||
|
||||
// Commands
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_SetMap(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_FontColor(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_BackGroundColor(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_HighLightColor(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_FontSize(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_Font(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_BufferSize(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_ClearConsole(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_Proportional(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_CharSpacing(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_CurrentSettings(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_DefaultSettings(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_CloseConsole(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_RepeatHandler(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommand_AppendLogToFile(const char* command, const char* arguments);
|
||||
int32_t ConsoleCommandComplete(const char* partial, const char** previous, int32_t direction);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue