X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fdpdefs%2Fmenudefs.qc;h=98a8003f2e5c83fa659eee1fd409c46a7414f609;hb=73b5db7874a1916b8d2fff36ab49607314a925dc;hp=c1198746171f79dd03925f9c2bbac36261717732;hpb=8a000d27bdf428db93e0304c4fdee5a26b89e9e8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/dpdefs/menudefs.qc b/qcsrc/dpdefs/menudefs.qc index c119874617..98a8003f2e 100644 --- a/qcsrc/dpdefs/menudefs.qc +++ b/qcsrc/dpdefs/menudefs.qc @@ -15,9 +15,10 @@ void end_sys_fields; void() m_init; void(float keynr, float ascii) m_keydown; -void() m_draw; +void(float width, float height) m_draw; void(float mode) m_toggle; void() m_shutdown; +// optional: float(float) m_gethostcachecategory; ///////////////////////////////////////////////////////// // sys constants @@ -36,18 +37,6 @@ float FILE_READ = 0; float FILE_APPEND = 1; float FILE_WRITE = 2; -/////////////////////////// -// logical constants (just for completeness) - -float TRUE = 1; -float FALSE = 0; - -/////////////////////////// -// boolean constants - -float true = 1; -float false = 0; - /////////////////////////// // msg constants @@ -96,7 +85,7 @@ float ERR_BADFILENAME = -4; // fopen float ERR_NULLSTRING = -1; float ERR_BADDRAWFLAG = -2; float ERR_BADSCALE = -3; -float ERR_BADSIZE = ERR_BADSCALE; +float ERR_BADSIZE = -3; // same as ERR_BADSCALE float ERR_NOTCACHED = -4; // server list stuff @@ -253,7 +242,7 @@ vector stov(string s) = #55; string strzone(string s) = #56; void strunzone(string s) = #57; -float tokenize(string s) = #58 +float tokenize(string s) = #58; string argv(float n) = #59; float isserver(void) = #60; @@ -303,7 +292,7 @@ float drawstring(vector position, string text, vector scale, vector rgb, float a float drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467; vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467; - + float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456; float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457; @@ -400,6 +389,7 @@ string(float ccase, float calpha, float cnum, string s, ...) strconv = #224; string(float chars, string s, ...) strpad = #225; string(string info, string key, string value, ...) infoadd = #226; string(string info, string key) infoget = #227; +float(string s1, string s2) strcmp = #228; float(string s1, string s2, float len) strncmp = #228; float(string s1, string s2) strcasecmp = #229; float(string s1, string s2, float len) strncasecmp = #230; @@ -433,7 +423,7 @@ float CVAR_TYPEFLAG_READONLY = 32; //idea: ?? //darkplaces implementation: LordHavoc //functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine -float() buf_create = #440; +int() buf_create = #440; void(float bufhandle) buf_del = #441; float(float bufhandle) buf_getsize = #442; void(float bufhandle_from, float bufhandle_to) buf_copy = #443; @@ -537,8 +527,8 @@ float(string s) tokenize_console = #514; float(float i) argv_start_index = #515; float(float i) argv_end_index = #516; string(float, float) getgamedirinfo = #626; -#define GETGAMEDIRINFO_NAME 0 -#define GETGAMEDIRINFO_DESCRIPTION 1 +const float GETGAMEDIRINFO_NAME = 0; +const float GETGAMEDIRINFO_DESCRIPTION = 1; float log(float f) = #532; string(string format, ...) sprintf = #627; string(string s) strdecolorize = #477; @@ -561,8 +551,11 @@ void resethostcachemasks(void) = #615; void sethostcachemaskstring(float mask, float fld, string str, float op) = #616; void sethostcachemasknumber(float mask, float fld, float num, float op) = #617; void resorthostcache(void) = #618; -void sethostcachesort(float fld, float descending) = #619; -void refreshhostcache(void) = #620; +float SLSF_DESCENDING = 1; +float SLSF_FAVORITES = 2; +float SLSF_CATEGORIES = 4; +void sethostcachesort(float fld, float slsf) = #619; +void refreshhostcache(...) = #620; // optional boolean argument "clear_list" float gethostcachenumber(float fld, float hostnr) = #621; float gethostcacheindexforkey(string key) = #622; void addwantedhostcachekey(string key) = #623;