Clean up some dangling definitions on the client side
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / commands / cl_cmd.qh
1 #pragma once
2
3 void Cmd_Scoreboard_SetFields(int);
4 void Cmd_Scoreboard_Help();
5 void ConsoleCommand_macro_init();
6
7 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
8 void LocalCommand_macro_write_aliases(int fh);
9
10 REGISTRY(CLIENT_COMMANDS, BITS(7))
11 #define CLIENT_COMMANDS_from(i) _CLIENT_COMMANDS_from(i, NULL)
12 REGISTER_REGISTRY(CLIENT_COMMANDS)
13 REGISTRY_SORT(CLIENT_COMMANDS)
14
15 #define CLIENT_COMMAND(id, description) \
16         CLASS(clientcommand_##id, Command) \
17                 ATTRIB(clientcommand_##id, m_name, string, #id); \
18         ATTRIB(clientcommand_##id, m_description, string, description); \
19         ENDCLASS(clientcommand_##id) \
20     REGISTER(CLIENT_COMMANDS, CMD_CL, id, m_id, NEW(clientcommand_##id)); \
21         METHOD(clientcommand_##id, m_invokecmd, void(clientcommand_##id this, int request, entity caller, int arguments, string command))
22
23 STATIC_INIT(CLIENT_COMMANDS_aliases) {
24         FOREACH(CLIENT_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_cl")));
25 }