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.
 
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.
     returntype(datatype param1) functionname = #[index];
+
     returntype(datatype param1) functionname = #[number];
[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
+
[number] 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;
 
     void(vector ang) makevectors = #1;
 
since the corresponding internal function is at index 1 within the table.
 
since the corresponding internal function is at index 1 within the table.

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)