Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Editing List of builtin functions

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Builtin functions are functions in QuakeC that perform a callback to a function within the engine itself. This was done to improve performance as some tasks were too expensive to do within QuakeC itself. They're declared by creating a function prototype and assigning it to an index within the internal builtin table.
+
[[QuakeC]] uses builtin functions to call bits of C code that can do 'jobs' for the QC that otherwise can't be done. Some functions affect the game world, some modify variables, and some maintain file lists for the engine. Each of the original functions are detailed below. Please note that builtin parameters/types/etc might differ between [[Quake]] and [[Hexen II]].
    returntype(datatype param1) functionname = #[index];
 
[index] in this case is the actual index of the function within the builtin table. This is not exposed to QuakeC at all so validation must be done by checking the table within the engine itself. For instance, <code>makevectors()</code> is defined as
 
    void(vector ang) makevectors = #1;
 
since the corresponding internal function is at index 1 within the table.
 
  
== Builtin Functions ==
+
===See Also===
Below are all of the builtin functions with the number signifying their index in the table.
+
* [[Builtin ranges]]
 +
* [[QSG extensions]]
  
=== Vanilla Builtins ===
 
 
{|style="border:1px solid #000000"
 
{|style="border:1px solid #000000"
 
|-
 
|-
Line 23: Line 19:
 
|-
 
|-
 
| 4 || [[setsize]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 4 || [[setsize]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 5 || [[lightstylestatic]] || || || [[H2MP]] || N/A
 
|-
 
|-
 
| 6 || [[break]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 6 || [[break]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
Line 77: Line 75:
 
|-
 
|-
 
| 32 || [[walkmove]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 32 || [[walkmove]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 33 || [[tracearea]] || || || [[H2MP]] || N/A
 
|-
 
|-
 
| 34 || [[droptofloor]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 34 || [[droptofloor]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
Line 87: Line 87:
 
|-
 
|-
 
| 38 || [[ceil]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 38 || [[ceil]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 39 || [[AwardExperience]] || || || [[H2MP]] || N/A
 
|-
 
|-
 
| 40 || [[checkbottom]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 40 || [[checkbottom]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
|-
 
| 41 || [[pointcontents]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 41 || [[pointcontents]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 42 || [[particle2]] || || || [[H2MP]] || N/A
 
|-
 
|-
 
| 43 || [[fabs]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 43 || [[fabs]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
Line 105: Line 109:
 
|-
 
|-
 
| 49 || [[ChangeYaw]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 49 || [[ChangeYaw]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 50 || [[vhlen]] || || || [[H2MP]] || N/A
 
|-
 
|-
 
| 51 || [[vectoangles]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 51 || [[vectoangles]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
Line 123: Line 129:
 
|-
 
|-
 
| 59 || [[WriteEntity]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
| 59 || [[WriteEntity]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
|-
 
| 67 || [[movetogoal]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 68 || [[precache_file]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 69 || [[makestatic]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 70 || [[changelevel]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 72 || [[cvar_set]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 73 || [[centerprint]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 74 || [[ambientsound]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 75 || [[precache_model2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 76 || [[precache_sound2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 77 || [[precache_file2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
| 78 || [[setspawnparms]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
|}
 
 
 
=== Extended Builtins ===
 
These are builtins that only certain source ports have access to.
 
{|style="border:1px solid #000000"
 
|-
 
|style="align:center" | '''#'''
 
|style="align:center" | '''Function'''
 
|style="align:center" colspan="3" | '''Supported by&nbsp;&nbsp;&nbsp;&nbsp;'''
 
|style="align:center" | '''[[QSG extensions|QSG Key]]'''
 
|-
 
| 5 || [[lightstylestatic]] || || || [[H2MP]] || N/A
 
|-
 
| 33 || [[tracearea]] || || || [[H2MP]] || N/A
 
|-
 
| 39 || [[AwardExperience]] || || || [[H2MP]] || N/A
 
|-
 
| 42 || [[particle2]] || || || [[H2MP]] || N/A
 
|-
 
| 50 || [[vhlen]] || || || [[H2MP]] || N/A
 
 
|-
 
|-
 
| 60 || [[sin]] || || || || [[DP_QC_SINCOSSQRTPOW]]
 
| 60 || [[sin]] || || || || [[DP_QC_SINCOSSQRTPOW]]
Line 193: Line 155:
 
|-
 
|-
 
| 66 || [[setclass]] || || || [[H2MP]] || N/A
 
| 66 || [[setclass]] || || || [[H2MP]] || N/A
 +
|-
 +
| 67 || [[movetogoal]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 68 || [[precache_file]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 69 || [[makestatic]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 70 || [[changelevel]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
|-
 
| 71 || [[lightstylevalue]] || || || [[H2MP]] || N/A
 
| 71 || [[lightstylevalue]] || || || [[H2MP]] || N/A
 +
|-
 +
| 72 || [[cvar_set]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 73 || [[centerprint]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 74 || [[ambientsound]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 75 || [[precache_model2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 76 || [[precache_sound2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 77 || [[precache_file2]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 +
|-
 +
| 78 || [[setspawnparms]] || [[NQ]] || [[QW]] || [[H2MP]] || N/A
 
|-
 
|-
 
| 79 || [[logfrag]] ||  || [[QW]] || || N/A
 
| 79 || [[logfrag]] ||  || [[QW]] || || N/A
Line 530: Line 514:
 
|}
 
|}
  
 
+
===[[Telejano]] (NQ)===
=== [[Telejano]] (NQ) ===
+
* [[cvarstring]]
*[[cvarstring]]
+
* [[readline]]
*[[readline]]
 
 
 
== See Also ==
 
*[[Builtin ranges]]
 
*[[QSG extensions]]
 

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)