X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcommand%2Fgeneric.qh;h=68aa0ae88af0d1b0b1deafc9eee5f46735da808a;hp=e419824ec8eb8d0aadf82735805bf1193c5bc713;hb=4eab3f0253a063bdbd4e1ff64c4b2b08077c44c4;hpb=86c9dc7c3696c329496b06375c1e79fb407401ce diff --git a/qcsrc/common/command/generic.qh b/qcsrc/common/command/generic.qh index e419824ec8..68aa0ae88a 100644 --- a/qcsrc/common/command/generic.qh +++ b/qcsrc/common/command/generic.qh @@ -1,7 +1,6 @@ -#ifndef COMMAND_GENERIC_H -#define COMMAND_GENERIC_H +#pragma once -#include "../constants.qh" +#include // ========================================================= // Declarations for common command code, written by Samual @@ -10,9 +9,9 @@ void GenericCommand_macro_help(); -float GenericCommand_macro_command(float argc, string command); +float GenericCommand_macro_command(int argc, string command); -float GenericCommand_macro_usage(float argc); +float GenericCommand_macro_usage(int argc); void GenericCommand_macro_write_aliases(float fh); @@ -22,7 +21,13 @@ void GenericCommand_macro_write_aliases(float fh); float GenericCommand(string command); // Returns command prefix specific for whatever program it is compiled in -string GetProgramCommandPrefix(void); +#ifdef SVQC + #define GetProgramCommandPrefix() "sv_cmd" +#elif defined(CSQC) + #define GetProgramCommandPrefix() "cl_cmd" +#elif defined(MENUQC) + #define GetProgramCommandPrefix() "menu_cmd" +#endif // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file #define CMD_Write(s) fputs(fh, s) @@ -33,4 +38,3 @@ void Curl_URI_Get_Callback(int id, float status, string data); int curl_uri_get_pos; float curl_uri_get_exec[URI_GET_CURL_END - URI_GET_CURL + 1]; string curl_uri_get_cvar[URI_GET_CURL_END - URI_GET_CURL + 1]; -#endif