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
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
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;
//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
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;
//DP_QC_STRINGBUFFERS
//idea: ??
-//darkplaces implementation: LordHavoc
+//darkplaces implementation: LadyHavoc
//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine
float() buf_create = #440;
void(float bufhandle) buf_del = #441;
//DP_QC_STRING_CASE_FUNCTIONS
//idea: Dresk
-//darkplaces implementation: LordHavoc / Dresk
+//darkplaces implementation: LadyHavoc / Dresk
//builtin definitions:
string(string s) strtolower = #480; // returns the passed in string in pure lowercase form
string(string s) strtoupper = #481; // returns the passed in string in pure uppercase form
//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;
+string(string search, string replace, string subject) strireplace = #485;
string(float uselocaltime, string format, ...) strftime = #478;
float(string s) tokenize_console = #514;
float(float i) argv_start_index = #515;
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;