-
Notifications
You must be signed in to change notification settings - Fork 1
/
fteqcc.ini
240 lines (240 loc) · 21.8 KB
/
fteqcc.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
optimisation t off # c = a*b is performed in one operation rather than two, and can
# cause older decompilers to fail.
optimisation i off # if (!a) was traditionally compiled in two statements. This optimisation
# does it in one, but can cause some decompilers to get confused.
optimisation p off # In the original qcc, function parameters were specified as a vector
# store even for floats. This fixes that.
optimisation c default # This optimisation strips out the names of constants (but not strings)
# from your progs, resulting in smaller files. It makes decompilers
# leave out names or fabricate numerical ones.
optimisation cs default # This optimisation strips out the names of string constants from
# your progs. However, this can break addons, so don't use it in
# those cases.
optimisation d off # This will merge definitions of constants which are the same value.
# Pay extra attention to assignment to constant warnings.
optimisation s off # This will compact the string table that is stored in the progs.
# It will be considerably smaller with this.
optimisation l default # Strips out local names and definitions. Most decompiles will break
# on this.
optimisation n default # This strips out the names of functions which are never called.
# Doesn't make much of an impact though.
optimisation f default # This strips out the filenames of the progs. This can confuse the
# really old decompilers, but is nothing to the more recent ones.
optimisation u off # Removes the entries of unreferenced variables. Doesn't make a
# difference in well maintained code.
optimisation r off # Optimises the pr_globals count by overlapping temporaries. In
# QC, every multiplication, division or operation in general produces
# a temporary variable. This optimisation prevents excess, and in
# the case of Hexen2's gamecode, reduces the count by 50k. This
# is the most important optimisation, ever.
optimisation a off # 5*6 actually emits an operation into the progs. This prevents
# that happening, effectivly making the compiler see 30
optimisation pf default # Strip out stuff wasted used in function calls and strings to the
# precache_file builtin (which is actually a stub in quake).
optimisation ro default # Functions ending in a return statement do not need a done statement
# at the end of the function. This can confuse some decompilers,
# making functions appear larger than they were.
optimisation cj default # This optimisation plays an effect mostly with nested if/else statements,
# instead of jumping to an unconditional jump statement, it'll jump
# to the final destination instead. This will bewilder decompilers.
optimisation sf default # Strips out the 'defs' of functions that were only ever called
# directly. This does not affect saved games, but will prevent FTE_MULTIPROGS/mutators
# from being able to hook functions.
optimisation lo default # Store all locals in a single section of the pr_globals. Vastly
# reducing it. This effectivly does the job of overlaptemps.
# However, locals are no longer automatically initialised to 0 (and
# never were in the case of recursion, but at least then its the
# same type).
# If locals appear uninitialised, fteqcc will disable this optimisation
# for the affected functions, you can optionally get a warning about
# these locals using: #pragma warning enable F302
optimisation vc default # Where a function is called with just a vector, this causes the
# function call to store three floats instead of one vector. This
# can save a good number of pr_globals where those vectors contain
# many duplicate coordinates but do not match entirly.
optimisation cf default # Strip class field names. This will harm debugging and can result
# in 'gibberish' names appearing in saved games. Has no effect on
# engines other than FTEQW, which will not recognise these anyway.
optimisation uf default # Strips any fields that have no references. This may result in
# extra warnings at load time, or disabling support for mapper-specified
# alpha in engines that do not provide that. FIXME: this is a little
# pointless until relocs are properly implemented.
keyword asm true # Disables the 'asm' keyword. Use the writeasm flag to see an example
# of the asm.
keyword break true # Disables the 'break' keyword.
keyword case true # Disables the 'case' keyword.
keyword class true # Disables the 'class' keyword.
keyword const true # Disables the 'const' keyword.
keyword continue true # Disables the 'continue' keyword.
keyword default true # Disables the 'default' keyword.
keyword entity true # Disables the 'entity' keyword.
keyword enum true # Disables the 'enum' keyword.
keyword enumflags true # Disables the 'enumflags' keyword.
keyword extern true # Disables the 'extern' keyword. Use only on functions inside addons.
keyword float true # Disables the 'float' keyword. (Disables the float keyword without
# 'local' preceeding it)
keyword for true # Disables the 'for' keyword. Syntax: for(assignment; while; increment)
# {codeblock;}
keyword goto true # Disables the 'goto' keyword.
keyword int true # Disables the 'int' keyword.
keyword integer true # Disables the 'integer' keyword.
keyword noref true # Disables the 'noref' keyword.
keyword unused false # Disables the 'unused' keyword. 'unused' means that the variable
# is unused, you're aware that its unused, and you'd rather not
# know about all the warnings this results in.
keyword used false # Disables the 'used' keyword. 'used' means that the variable is
# used even if the qcc can't see how - thus preventing it from ever
# being stripped.
keyword static true # Disables the 'static' keyword. 'static' means that a variable
# has altered scope. On globals, the variable is visible only to
# the current .qc file. On locals, the variable's value does not
# change between calls to the function. On class variables, specifies
# that the field is a scoped global instead of a local. On class
# functions, specifies that 'this' is expected to be invalid and
# that the function will access any memembers via it.
keyword nonstatic true # Disables the 'nonstatic' keyword. 'nonstatic' acts upon globals+functions,
# reverting the defaultstatic pragma on a per-variable basis. For
# use by people who prefer to keep their APIs explicit.
keyword ignore false # Disables the 'ignore' keyword. 'ignore' is expected to typically
# be hidden behind a 'csqconly' define, and in such a context can
# be used to conditionally compile functions a little more gracefully.
# The opposite of the 'used' keyword. These variables/functions/members
# are ALWAYS stripped, and effectively ignored.
keyword nosave true # Disables the 'nosave' keyword.
keyword inline true # Disables the 'inline' keyword.
keyword strip true # Disables the 'strip' keyword.
keyword shared true # Disables the 'shared' keyword.
keyword state false # Disables the 'state' keyword.
keyword optional true # Disables the 'optional' keyword.
keyword inout false # Disables the 'inout' keyword.
keyword string true # Disables the 'string' keyword.
keyword struct true # Disables the 'struct' keyword.
keyword switch true # Disables the 'switch' keyword.
keyword thinktime false # Disables the 'thinktime' keyword which is used in HexenC
keyword until false # Disables the 'until' keyword which is used in HexenC
keyword loop false # Disables the 'loop' keyword which is used in HexenC
keyword typedef true # Disables the 'typedef' keyword.
keyword union true # Disables the 'union' keyword.
keyword var true # Disables the 'var' keyword.
keyword vector true # Disables the 'vector' keyword.
keyword wrap true # Disables the 'wrap' keyword.
keyword weak true # Disables the 'weak' keyword.
keyword accumulate false # Disables the 'accumulate' keyword.
flag acc false # Reacc is a pascall like compiler. It was released before the Quake
# source was released. This flag has a few effects. It sorts all
# qc files in the current directory into alphabetical order to compile
# them. It also allows Reacc global/field distinctions, as well
# as allows | for linebreaks. Whilst case insensitivity and lax
# type checking are supported by reacc, they are seperate compiler
# flags in fteqcc.
flag qccx false # WARNING: This syntax makes mods inherantly engine specific.
# Do NOT use unless you know what you're doing.This is provided
# for compatibility only
# Any entity hacks will be unsupported in FTEQW, DP, and others,
# resulting in engine crashes if the code in question is executed.
flag kce true # If you want keywords to NOT be disabled when they a variable by
# the same name is defined, check here.
flag parms false # if PARM0 PARM1 etc should be defined by the compiler. These are
# useful if you make use of the asm keyword for function calls,
# or you wish to create your own variable arguments. This is an
# easy way to break decompilers.
flag autoproto false # Causes compilation to take two passes instead of one. The first
# pass, only the definitions are read. The second pass actually
# compiles your code. This means you never have to remember to prototype
# functions again.
flag wasm false # Writes out a qc.asm which contains all your functions but in assembler.
# This is a great way to look for bugs in fteqcc, but can also be
# used to see exactly what your functions turn into, and thus how
# to optimise statements better.
flag annotate false # Annotate source code with assembler statements on compile (requires
# gui).
flag nullemptystr false # Empty string immediates will have the raw value 0 instead of 1.
flag ifstring true # Causes if(string) to behave identically to if(string!=) This is
# most useful with addons of course, but also has adverse effects
# with FRIK_FILE's fgets, where it becomes impossible to determin
# the end of the file. In such a case, you can still use asm {IF
# string 2;RETURN} to detect eof and leave the function.
flag iffloat false # Fixes certain floating point logic.
flag ifvector true # Fixes conditional vector logic.
flag vectorlogic true # Fixes conditional vector logic.
flag brokenarray false # Treat references to arrays as references to the first index of
# said array, to replicate an old fteqcc bug.
flag rootconstructor false # When enabled, the root constructor should be called first like
# in c++.
flag caseinsens false # Causes fteqcc to become case insensitive whilst compiling names.
# It's generally not advised to use this as it compiles a little
# more slowly and provides little benefit. However, it is required
# for full reacc support.
flag lax false # Disables many errors (generating warnings instead) when function
# calls or operations refer to two normally incompatible types.
# This is required for reacc support, and can also allow certain
# (evil) mods to compile that were originally written for frikqcc.
flag hashonly false # Allows use of only #constant for precompiler constants, allows
# certain preqcc using mods to compile
flag lo false # This changes the behaviour of your code. It generates additional
# if operations to early-out in if statements. With this flag, the
# line if (0 && somefunction()) will never call the function. It
# can thus be considered an optimisation. However, due to the change
# of behaviour, it is not considered so by fteqcc. Note that due
# to inprecisions with floats, this flag can cause runaway loop
# errors within the player walk and run functions (without iffloat
# also enabled). This code is advised:
# player_stand1:
# if (self.velocity_x || self.velocity_y)
# player_run
# if (!(self.velocity_x || self.velocity_y))
flag msvcstyle false # Generates warning and error messages in a format that msvc understands,
# to facilitate ide integration.
flag debugmacros false # Print out the contents of macros that are expanded. This can help
# look inside macros that are expanded and is especially handy if
# people are using preprocessor hacks.
flag filetimes false # Recompiles the progs only if the file times are modified.
flag fastarrays false # Generates extra instructions inside array handling functions to
# detect engine and use extension opcodes only in supporting engines.
# Adds a global which is set by the engine if the engine supports
# the extra opcodes. Note that this applies to all arrays or none.
flag assumeint false # Numerical constants are assumed to be integers, instead of floats.
flag subscope false # Restrict the scope of locals to the block they are actually defined
# within, as in C.
flag verbose false # Lots of extra compiler messages.
flag typeexplicit false # All type conversions must be explicit or directly supported by
# instruction set.
flag boundchecks true # Disable array index checks, speeding up array access but can result
# in your code misbehaving.
flag attributes false # WARNING: This syntax conflicts with vector constructors.
flag assumevar false # Initialised globals will be considered non-const by default.
flag ssp false # Treat ** as an operator for exponents, instead of multiplying
# by a dereferenced pointer.
flag cpriority false # QC treats !a&&b as equivelent to !(a&&b). When this is set, behaviour
# will be (!a)&&b as in C. Other operators are also affected in
# similar ways.
flag allowuninit false # Permit optimisations that may result in locals being uninitialised.
# This may allow for greater reductions in temps.
flag nofileline false # Ignores #pragma file(foo) and #pragma line(foo), so that errors
# and symbols reflect the actual lines, instead of the original
# source.
flag utf8 false # String immediates will use utf-8 encoding, instead of quake's
# encoding.
flag embedsrc false # Write the sourcecode into the output file. The resulting .dat
# can be opened as a standard zip archive (or by fteqccgui).
# Good for GPL compliance!
showall off # Show all keyword options in the gui
compileonstart off # Recompile on GUI startup
log off # Write out a compile log
enginebinary d:\Quakec\fteqw64.exe # Location of the engine binary to run. Change this to something
# else to run a different engine, but not all support debugging.
basedir d:\Quakec # The base directory of the game that contains your sub directory
engineargs "-game progs_dump +exec fte.cfg"
# The engine commandline to use when debugging. You'll likely want
# to ensure this contains -window as well as the appropriate -game
# argument.
srcfile progs.src # The progs.src file to load to find ordering of other qc files.
src # Additional subdir to read qc files from. Typically blank (ie:
# the working directory).
tabsize 8 # Specifies the size of tabs in scintilla windows.
extramargins off # Enables line number and folding margins.
hexen2 off # Enable the extra tweaks needed for compatibility with hexen2 engines.
extendedopcodes off # Utilise an extended instruction set, providing support for pointers
# and faster arrays and other speedups.
parameters # Other additional parameters that are not supported by the gui.
# Likely including -DFOO