text
stringlengths 0
774
|
---|
<s>[INST] What are Literals in QuakeC?[/INST]
|
" A literal represents a value literally, that is, by means of notation suited to its kind. A literal is either a
|
numeric_literal, or a string_literal."</s>
|
<s>[INST]What are Numeric Literals in QuakeC?[/INST]
|
" A real_literal is a numeric_literal that includes a point; an integer_literal is a numeric_literal without a point.
|
All numeric values in QuakeC are floating point values.
|
5
|
0.2
|
-25.0
|
A vector_literal is a set of three real_literals enclosed by single quotes (β).
|
β0 0 0β
|
β10 β12.5 0.0001β"</s>
|
<s>[INST] What are String Literals in QuakeC?[/INST]
|
" A string_literal is formed by a sequence of graphic characters (possibly none) enclosed between two
|
quotation marks (β) used as string brackets.
|
βThis is a stringβ
|
βThis is a string followed by a newline\nβ"</s>
|
<s>[INST] What are Built-In Functions in QuakeC? [/INST]
|
" A built-in function immediate is a pound sign (β#β), followed by an integer.
|
#1
|
#12""</s>
|
<s>[INST] What are Comments in QuakeC? [/INST]
|
" Comments are the same as in C++ (and many C languages). The beginning of a comment is indicated
|
with a double forward slash (//). QuakeC ignores everything on a line starting with the forward double
|
slash until the end of the line.
|
An alternative form of comment (called an extended comment) begins with the characters β/*β and ends
|
with the characters β*/β. As with ordinary comments, all of the characters of an extended comment,
|
including the leading β*/β and trailing β*/β, are treated as whitespace. Comments of this form may extend
|
over multiple lines.
|
// followed by comments, until the next line.
|
/* enclose an extended comment */"</s>
|
<s>[INST] What is Model Pragma in QuakeC?[/INST]
|
" Here are a few definitions that are commonly found in the QuakeC code defining the behavior of animated
|
models (monsters, players, etc.). The QuakeC compiler does not interpret most of this information, but it's
|
useful for the program modelgen that generates the models.
|
Animation Flags
|
$flags rotation
|
Rotation characteristic of the object. QuakeC does not interpret this field, but it's useful for the program
|
modelgen that generates the models. Possible values for $flags: 8 (the object keeps rotating, like
|
armors, etc.). Other values are not known yet.
|
Base
|
$base object
|
QuakeC does not interpret this field, but it's useful for the program modelgen that generates the models.
|
The parameter object is the name of a model file that will be used as a kind of starting position for
|
animation.
|
Directory
|
$cd <dir>
|
Specify the directory where your model file (.MDL) is located.
|
Frame Definitions
|
$frame [<frame> [<frame2> ...]]
|
This defines several animation frames of the object. For every animation frame defined, you must also
|
define a QuakeC frame function that will be called during this animation frame.
|
Model Name
|
$modelname name
|
The parameter name is the name of the model file defining the object.
|
Origin
|
$origin vector
|
This field is not interpreted by QuakeC, but it's useful for the program modelgen that generates the
|
models. The parameter vector is the location of the object within the bounding box, in the quake editor.
|
Scale Factor
|
$scale number
|
This field is not interpreted by QuakeC, but it's useful for the program modelgen that generates the
|
models. The parameter number comes from the texmake number that is generated. You can use
|
different values if you want.
|
Skin File
|
$skin skinfile
|
This field is not interpreted by QuakeC, but it's useful for the program modelgen that generates the
|
models. The parameter skinfile is the name (without extension) of the .LBM file that defines the skin of
|
the object, as generated by the program texmake."</s>
|
<s>[INST] What are Declarations and Types in QuakeC? [/INST]
|
" A set of values, and a set of primitive operations that implement the fundamental aspects of its semantics
|
characterize a type. An object of a given type is a run-time entity that contains (has) a value of the type.
|
You cannot define new types from the existing ones. In particular, you cannot define new structures or
|
objects. These restrictions make QuakeC compare unfavorably even to BASIC.
|
You can add only fields to the most important type in QuakeC: entity"</s>
|
<s>[INST] What are Simple Types in QuakeC?[/INST]
|
" Void Types
|
void_declaration β void
|
An empty result, mostly used for definition of procedures (i.e. functions that return no result at all).
|
Floating Point Types
|
floating_point_declaration β float name
|
A floating point value. Floats are also used to store Boolean (TRUE, FALSE) values; integer values, like
|
counters; or bit flags.
|
A parsing ambiguity is present with negative constants: "a-5" (five subtracted from a) will be parsed as
|
"a", then "-5", causing an error. Separate the β-β from the digits with a space ("a - 5") to get the proper
|
behavior.
|
Vector Types
|
vector_declaration β vector name
|
A vector is made up of three float coordinates. Used to represent positions or directions in 3D space.
|
Note that single quotes (β) surround a vector. Do not use double quotes, they are reserved for strings.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.