X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=dpdefs%2Fmenudefs.qc;h=b987491b7cf778c5ea33bcfb2f783851b5a60461;hb=e73dfbb6367cb7bffe644e0eb070c0d31fa2e824;hp=ad7c1bd5659388f7b9bb65307ad5f55c610a950f;hpb=d93b11b3f40d1ca94ed20e70c7a2fcf95670df73;p=xonotic%2Fdarkplaces.git diff --git a/dpdefs/menudefs.qc b/dpdefs/menudefs.qc index ad7c1bd5..b987491b 100644 --- a/dpdefs/menudefs.qc +++ b/dpdefs/menudefs.qc @@ -15,7 +15,7 @@ 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; @@ -159,7 +159,7 @@ float OS_MAC = 2; ////////////////////////////////////////////////// // AK FIXME: Create perhaps a special builtin file for the common cmds -void checkextension(string ext) = #1; +float checkextension(string ext) = #1; // error cmds void error(string err,...) = #2; @@ -179,7 +179,7 @@ float vlen(vector v) = #9; float vectoyaw(vector v) = #10; vector vectoangles(vector v) = #11; -float random(void) = #12; +float random(void) = #12; // Returns a random number > 0 and < 1 void cmd(string command, ...) = #13; @@ -246,7 +246,7 @@ string fgets(float fhandle) = #50; void fputs(float fhandle, string s) = #51; float strlen(string s) = #52; -string strcat(string s1,string s2,...) = #53; +string strcat(string s, string...) = #53; string substring(string s, float start, float length) = #54; vector stov(string s) = #55; @@ -354,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 @@ -401,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; @@ -432,7 +434,7 @@ float CVAR_TYPEFLAG_READONLY = 32; //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; @@ -448,7 +450,7 @@ void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517; //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 @@ -475,6 +477,16 @@ string(string digest, string data, ...) digest_hex = #639; //if the given digest is not supported, string_null is returned //the digest string is matched case sensitively, use "MD4", not "md4"! +//DP_QC_WHICHPACK +//idea: divVerent +//darkplaces implementation: divVerent +//builtin definitions: +string(string filename) whichpack = #503; +//description: +//for files in a pak/pk3/whatever, returns the pack's file name in FRIK_FILE name space. +//for physical files, returns "". +//in case of error, returns string_null. + //DP_QC_URI_ESCAPE //idea: div0 //darkplaces implementation: div0 @@ -530,9 +542,25 @@ 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. + +//DP_QC_FS_SEARCH_PACKFILE +//idea: Mario +//darkplaces implementation: Mario +//builtin definitions: +float(string pattern, float caseinsensitive, float quiet, string packfile) search_packfile_begin = #74; +//description: +//extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload). +//only searches for files within the specified packfile, which is expected to match the results of whichpack(). + // 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;