]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - dpdefs/menudefs.qc
Add more CHECKGLERROR calls, and clean up a few obsolete code scraps.
[xonotic/darkplaces.git] / dpdefs / menudefs.qc
index c1198746171f79dd03925f9c2bbac36261717732..8caab4a9279e6afec354b94d2f43236be0564c25 100644 (file)
@@ -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
@@ -96,7 +97,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 +254,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;
@@ -353,6 +354,7 @@ float(string key) stringtokeynum = #341;
 //field definitions: (MENUQC)
 string(string serveraddress) crypto_getkeyfp = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
 string(string serveraddress) crypto_getidfp = #634; // retrieves the cached host key fingerprint of a server given by IP address
+float(string serveraddress) crypto_getidstatus = #643; // retrieves the cached host key's key status. See below for CRYPTO_IDSTATUS_ defines.
 string(string serveraddress) crypto_getencryptlevel = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
 string(float i) crypto_getmykeyfp = #636; // retrieves the CA key fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
 string(float i) crypto_getmyidfp = #637; // retrieves the ID fingerprint of a given CA slot, or "" if slot is unused but more to come, or string_null if end of list
@@ -400,6 +402,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;
@@ -529,6 +532,12 @@ float FIELD_FUNCTION = 6;
 //getentityfieldstring returns data as would be written to a savegame, eg... "0.05" (float), "0 0 1" (vector), or "Hello World!" (string). Function names can also be returned.
 //putentityfieldstring puts the data returned by getentityfieldstring back into the entity.
 
+//DP_COVERAGE
+//idea: divVerent
+//darkplaces implementation: divVerent
+//function definitions:
+void coverage() = #642;  // Reports a coverage event. The engine counts for each of the calls to this builtin whether it has been called.
+
 // assorted undocumented extensions
 string(string, float) netaddress_resolve = #625;
 string(string search, string replace, string subject) strreplace = #484;
@@ -561,8 +570,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;