From 0163d917912ab60162a460f41830ef72991f9e15 Mon Sep 17 00:00:00 2001 From: SHADOWELITE7 Date: Wed, 6 Mar 2024 18:08:43 -0500 Subject: [PATCH] edited files and finished section 9 of FTEQCC HTML --- README.md | 8 ++-- fteqcc_manual.html | 102 ++++++++++++++++++++++++++++++++++++++++++++- index.html | 3 +- 3 files changed, 106 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 08c2fd5..49799a1 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,9 @@ At least to help for getting the referencial info on QuakeC. We've decided to gather all the most useful resources referenced by the people that have been coding in QuakeC... to help newcomers and veterans in condensing the information in one place. ### QuakeC Reference manual -[HTML Version](https://usdqc.github.io/quakec-resources/qcmanual.html) - [PDF Version](https://usdqc.github.io/quakec-resources/quakec.pdf) -[Doc Version]() +[DOCX Version](https://usdqc.github.io/quakec-resources/quakec.docx) @@ -24,7 +22,7 @@ We've decided to gather all the most useful resources referenced by the people t ### QuakeC Manual -[HTML Version](https://github.com/USDQC/quakec-resources/blob/website/qcmanual.html) +[HTML Version](https://usdqc.github.io/quakec-resources/qcmanual.html) ## Credits and another info. @@ -38,4 +36,4 @@ Credits: Special thanks to: The quake mapping community, especially to the programmers and coders of our community, you all rock! -[GNU GENERAL PUBLIC LICENSE](https://github.com/USDQC/quakec-resources/blob/website/LICENSE.md) +[GNU GENERAL PUBLIC LICENSE](https://github.com/USDQC/quakec-resources/blob/master/LICENSE.md) diff --git a/fteqcc_manual.html b/fteqcc_manual.html index 116dccb..ac2d216 100644 --- a/fteqcc_manual.html +++ b/fteqcc_manual.html @@ -1155,6 +1155,106 @@

Accessors

This is useful with accessors built around hashtables. The unnamed property can be a non-array too - such properties can be accessed only via eg '*b'.

- +

Type Modifiers

+

const / var

+

Definitions are either constants or variables. +Initialised globals are normally considered constants, while locals are always +assumed to be variables (this part differs from vanilla qcc). +Uninitialised field and function globals are considered const also (const fields +will be auto-initialised, while functions will generate an error if they are not +explicitly initialised).

+ +

__unused / noref

+

This variable is probably unused. Don't warn about it. +These variables may also be stripped completely if they are not referenced +anywhere.

+ +

__used

+

This variable is actually used somewhere, even if the qcc cannot tell that +(eg: by the engine). There will be no warnings about it being unused, and it +will NOT be auto-stripped.

+ +

local

+

Obsolete prefix that means nothing on its own. +Vanilla QC used this to tell the compiler to expect a variable definition inside +a function (instead of actual code). However, in FTEQCC this should not normally +be needed except with certain rare type modifiers.

+ +

static / nonstatic

+

Static globals are visible only within the .qc file in which they are defined. +Static locals are visible only within the function in which they are defined +(but also become persistent and do not lose their values between calls - like +globals). +
+Note that static variables use name mangling that might get renamed between +releases, which can break saved games if you're not careful.

+ +

nosave

+

Globals marked as nosave will not appear in saved games. +They will thus lose their values in saved games, which might either be +undesirable, or a clumsy way to detect reloads. +When the game is reloaded, they will typically revert to the values that were +set at time=0.2 on account of the weird way that saved games work. +nosave is recommended for variables that track objects which cannot be reloaded, +like file handles.

+ +

inline

+

Functions marked as inline will be eligable for inlining for a small performance +boost. +
+FTEQCC's inlining is limited, and should generally only be used for small +functions (eg ones that exist to just call other functions with a different +argument order etc).

+

strip / __ignore

+

This variable / function / field is NOT used. Function bodies will be ignored, +and any definitions will be stripped. If the qcc detects that it is still +required somewhere, you will get a compile error. This can be used inside +#defines to create CSQC-only or ssqc-only functions without needing #ifdefs +inside every single function.

+ +

shared

+

Globals marked as shared will have the same value regardless of which dat it +was defined in within a single QCVM (read: for mutators, not CSQC).

+ +

optional

+

optional function arguments may be omitted without warnings/errors. Note that +only the engine can tell how many args were actually passed, so this should +normally only be used on builtins. +QC functions should normally use initialised arguments instead. These have +well-defined values if the argument is ommitted (slightly slower, but avoids the +need for extra signalling).

+ +

__inout / __in / __out

+

Valid only for function arguments. +By default, all function arguments are __in arguments. However, if they're +defined as __inout or __out then any changes the callee made to the argument +will be written back to the passed value in the caller. +__out arguments cannot accept constants, nor any other expression that cannot be +assigned to (like additions etc). +This mechanism allows a function to return multiple values without needing to +resort to vectors nor structs nor pointers.

+ +

__weak

+

Weak symbols will not conflict with other definitions of the same variable. +Weak symbols will be ignored if they are already defined, and replaced if +followed by a non-weak definition with the same name.

+ +

__wrap

+

Defines a function that is a wrapper for a prior instance of the function with +the same name. +There MUST be a function already defined with the same name, you can define one +as __weak if there is not. If you combine __weak and _wrap on the same function, +then the function will be silently ignored if there was no prior define. +Wrappers MUST reference their 'prior' function, but they can do so by discarding +it, eg: (void)prior;

+ +

__accumulate

+

Accumultate is a more efficient but limited way of combining functions. +Additional definitions of the function will be concatenated onto the end of the +prior function. A followed return statement in any of the prior functions will +prevent any later accumulations from executing - thus an alternative way to +specify return values is recommended, eg: return = 5;

+ + \ No newline at end of file diff --git a/index.html b/index.html index 42e85d8..83e0cd7 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,11 @@

Manuals

Here are a list of pages for QuakeC Manuals

+

This project aims to bring all resources on QuakeC in one place. Feel free to contribute to the project on our GitHub.

QuakeC (Web) (PDF) (DOCX)
FTEQCC (TXT) (Web) -

This Project is licensed under the GPLv3 License

\ No newline at end of file +

This Project is licensed under the GPLv3 License

\ No newline at end of file