]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/command/generic.qh
Merge branch 'master' into Lyberta/GamemodesSplit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / command / generic.qh
1 #pragma once
2
3 #include <common/constants.qh>
4
5 // =========================================================
6 //  Declarations for common command code, written by Samual
7 //  Last updated: December 28th, 2011
8 // =========================================================
9
10 void GenericCommand_macro_help();
11
12 float GenericCommand_macro_command(int argc, string command);
13
14 float GenericCommand_macro_usage(int argc);
15
16 void GenericCommand_macro_write_aliases(float fh);
17
18 // Used by other game command systems for common commands,
19 // and it returns true if handled, false if not.
20 // Note: It tokenizes its input, so be careful!
21 float GenericCommand(string command);
22
23 // Returns command prefix specific for whatever program it is compiled in
24 #ifdef SVQC
25         #define GetProgramCommandPrefix() "sv_cmd"
26 #elif defined(CSQC)
27         #define GetProgramCommandPrefix() "cl_cmd"
28 #elif defined(MENUQC)
29         #define GetProgramCommandPrefix() "menu_cmd"
30 #endif
31
32 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
33 #define CMD_Write(s) fputs(fh, s)
34 #define CMD_Write_Alias(execute,command,description) CMD_Write(sprintf("alias %-20s \"%-13s %-20s ${* ?}\" // %s\n", command, execute, command, description))
35 void GenericCommand_macro_write_aliases(float fh);
36
37 void Curl_URI_Get_Callback(int id, float status, string data);
38 int curl_uri_get_pos;
39 float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1];
40 string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1];