X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcommand%2Fgeneric.qh;h=68aa0ae88af0d1b0b1deafc9eee5f46735da808a;hb=991de5e6922cd3c283de56c3249624f0f1bfe767;hp=0bb09b4e737a9eea3a87a2f20f9f65ff8bf7e6ea;hpb=244e5081c5c503c307e557c98ac864f6c9731475;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/command/generic.qh b/qcsrc/common/command/generic.qh index 0bb09b4e7..68aa0ae88 100644 --- a/qcsrc/common/command/generic.qh +++ b/qcsrc/common/command/generic.qh @@ -1,8 +1,6 @@ -#ifndef GENERIC_H -#define GENERIC_H +#pragma once -#include "markup.qh" -#include "rpn.qh" +#include // ========================================================= // Declarations for common command code, written by Samual @@ -11,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); @@ -23,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) @@ -34,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