]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/dpdefs/upstream/menudefs.qc
Update dpdefs/upstream
[xonotic/xonotic-data.pk3dir.git] / qcsrc / dpdefs / upstream / menudefs.qc
index d1a67ab08525c485ec535e8af52e4f8e45388a28..1278dd710a8052bd77db771c258db428be8c0904 100644 (file)
@@ -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;
 
@@ -304,7 +304,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;
@@ -434,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;
@@ -450,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
@@ -477,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
@@ -538,9 +548,19 @@ float FIELD_FUNCTION = 6;
 //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;