mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-07 15:19:53 +03:00
feat(console): implement ConsoleInitializeClientCommand
This commit is contained in:
1 parent
08faeb135d
commit
fb0934af0f
6 files changed
+56
-25
No files matched your search
+16
-2
@@ -1,10 +1,24 @@
|
||||
#include "console/Client.hpp"
|
||||
#include "CVar.hpp"
|
||||
#include "CommandHandlers.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include "console/Command.hpp"
|
||||
|
||||
static const char* s_filename;
|
||||
|
||||
void ConsoleInitializeCommonCommand() {
|
||||
ConsoleCommandRegister("quit", ConsoleCommand_Quit, DEFAULT, NOHELP);
|
||||
ConsoleCommandRegister("ver", ConsoleCommand_Ver, DEFAULT, NOHELP);
|
||||
ConsoleCommandRegister("setmap", ConsoleCommand_SetMap, DEFAULT, NOHELP);
|
||||
}
|
||||
|
||||
void ConsoleInitializeDebugCommand() {
|
||||
// Unknown without debug build
|
||||
}
|
||||
|
||||
void ConsoleInitializeClientCommand() {
|
||||
// TODO
|
||||
ConsoleCommandInitialize();
|
||||
ConsoleInitializeCommonCommand();
|
||||
ConsoleInitializeDebugCommand();
|
||||
}
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* filename) {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
void ConsoleInitializeClientCommand();
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* a1);
|
||||
void ConsoleInitializeClientCVar(const char* filename);
|
||||
|
||||
#endif
|
||||
+1
-16
@@ -1,4 +1,5 @@
|
||||
#include "console/Command.hpp"
|
||||
#include "console/CommandHandlers.hpp"
|
||||
#include <storm/Error.hpp>
|
||||
|
||||
int32_t ValidateFileName(const char* filename) {
|
||||
@@ -68,19 +69,3 @@ void ConsoleCommandUnregister(const char* command) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
// ConsolePostClose()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
@@ -48,10 +48,4 @@ int32_t ConsoleCommandRegister(const char* command, int32_t (*handler)(const cha
|
||||
|
||||
void ConsoleCommandUnregister(const char* command);
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "console/CommandHandlers.hpp"
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
// ConsolePostClose()
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_SetMap(const char* command, const char* arguments) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef CONSOLE_COMMAND_HANDLERS_HPP
|
||||
#define CONSOLE_COMMAND_HANDLERS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_SetMap(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user