FTEQCC(1)

πŸŽ€ FTEQCC(1) πŸŽ€

okay so this is the manual page for fteqcc, from the General Commands Manual section of your friendly neighbourhood man pages. it's giving "compiler girlie who knows her stuff" and honestly? iconic. let's get into it πŸ’–


✨ NAME ✨

fteqcc β€” the FTE QuakeC compiler, no cap πŸ¦‹


✨ SYNOPSIS ✨

fteqcc [options]

that's it. that's the whole vibe. just you, your flags, and destiny ✨


✨ DESCRIPTION ✨

bestie. listen. this manual page is the brief rundown of the fteqcc command β€” the little intro, the meet-cute, if you will. 🫢

fteqcc is a program that compiles QuakeC sourcecode into binary game data for Quake1 or QuakeWorld based games. that's the whole job. it takes your cute little QC files and turns them into the actual game data. literally the glow-up pipeline. πŸ’…


✨ OPTIONS ✨

here's the full roster, no skipping, every single one gets its moment πŸ‘‘

  • --help β€” shows you a summary of the options. the "help me help you" flag. πŸ™ˆ
  • -Fautoproto β€” turns on automatic prototyping. it just does it for you, slay.
  • -Fwasm β€” dumps all the assembler code out to qc.asm. all of it. the whole thing. go off. πŸ”₯
  • -Kkeyword, -Kno-keyword β€” flips language keywords on or off, one at a time. the keywords you're allowed to toggle are: asm, break, case, class, const, continue, default, entity, enum, enumflags, extern, float, for, goto, int, integer, noref, nosave, shared, state, string, struct, switch, thinktime, typedef, union, var and vector. yes bestie, that's the whole list, I counted. πŸ’œ
  • -O0, -O1, -O2, -O3 β€” pick an optimisation level from 0 to 3. with 0, no optimisation happens at all, and the other values include more or less of the options living down in the OPTIMISATION section. choose your fighter. ✨
  • -src directory β€” tells it which directory to go looking in for source files (progs.src). point it at the right place, bestie. πŸ“
  • -Wall β€” shows all the warnings. all of them. every last one. it's giving "we're telling you everything" energy. πŸ‘€

✨ FORMAT ✨

fteqcc supports several output formats, so you can pick the one that matches your target game's whole aesthetic. 🌈

  • -Tstandard, -Tq1, -Tquakec β€” this is the default setting, and it generates code compatible with original Quake1. the classic. the blueprint. πŸŽ€
  • -Thexen2, -Th2 β€” outputs Hexen2 compatible code. different game, different energy. ⭐
  • -Tkkqwsv, -Tkk7, -Tbigprogs, -Tversion7, -Tkkqwsv β€” generates KK Version 7 compatible progs. (yes, -Tkkqwsv is listed twice in the original, and I am not the one who's gonna touch that. periodt. πŸ’€)
  • -Tfte β€” generates code that's specific to FTE Quake. the FTE-exclusive drip. πŸ‘‘

✨ OPTIMISATION ✨

these options are how you fine-tune the optimisation, bestie. some of them get activated automatically on their own, like they have main character energy and don't need your permission. πŸ’…

  • -Oassignments β€” c = a*b gets performed in one single operation instead of two. downside: it can make older decompilers fail. so, iconic but chaotic. 😭
  • -Oshortenifs β€” if (!a) was traditionally compiled into two statements. this optimisation does it in one, but it can cause some decompilers to get confused. they're just not ready for her. πŸ¦‹
  • -Ononvec_parms β€” in the original qcc, function parameters were specified as a vector store even for floats. this fixes that. finally. 🫢
  • -Oconstant_names β€” strips out the names of constants from your progs, which results in smaller files. side effect: it makes decompilers either leave out names entirely or fabricate numerical ones. rude but effective. πŸ’…
  • -Oconstant_name_strings β€” strips out the names of string constants from your progs.
⚠️ this can break addons, so do not use it in those cases. I'm serious, bestie. don't do it. πŸ’€
  • -Odupconstdefs β€” merges definitions of constants that have the same value. pay extra attention to assignment-to-constant warnings when you use this one, okay? πŸ‘€
  • -Onouplicatestrings β€” compacts the string table that's stored in the progs. it'll be considerably smaller with this. skinny legend. ✨
  • -Olocals β€” strips out local names and definitions. this makes it REALLY hard to decompile. like, genuinely. good luck to whoever tries. 😭
  • -Ofunction_names β€” strips out the names of functions that are never called. doesn't make much of an impact though, so it's kind of a lowkey one. πŸ™ˆ
  • -Ofilenames β€” strips out the filenames from the progs. this can confuse the really old decompilers, but it's nothing to the more recent ones. they ate and left no crumbs. πŸ“
  • -Ounreferenced β€” removes the entries of unreferenced variables. doesn't make a difference in well maintained code, so if you're tidy it's a no-op basically. 🧚
  • -Ooverlaptemps β€” optimises the pr_globals count by overlapping temporaries. here's the tea: in QC, every multiplication, division, or operation in general produces a temporary variable. this optimisation prevents the excess, and in the case of Hexen2's gamecode it reduces the count by 50k. this is the most important optimisation, ever. no exaggeration. πŸ”₯πŸ‘‘
  • -Oconstantarithmatic β€” 5*6 actually emits an operation into the progs. this prevents that from happening, effectively making the compiler see 30. math? in my compiler? it's more likely than you think. ⭐
  • -Oprecache_file β€” strips out stuff that's wasted and used in function calls and strings to the precache_file builtin (which is actually a stub in quake). bye, wasted bytes. πŸ‘‹
  • -Oreturn_only β€” functions that end in a return statement don't need a done statement at the end of the function. this can confuse some decompilers, making functions appear larger than they actually were. catfishing, basically. πŸ’…
  • -Ocompound_jumps β€” this optimisation plays its biggest effect with nested if/else statements: instead of jumping to an unconditional jump statement, it'll jump straight to the final destination instead. this will bewilder decompilers. not sorry. 😌
  • -Ostrip_functions β€” strips out the defs of functions that were only ever called directly. this does not affect saved games, so you're safe. 🫢
  • -Olocals_marshalling β€” stores all locals in one section of the pr_globals, vastly reducing it. this effectively does the job of overlaptemps. ✨
⚠️ it's been noticed as buggy by a few people, however, and the circumstances where it causes problems are not yet known. use with caution, bestie. 😭
  • -Ovectorcals β€” 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 don't match entirely. every byte counts. πŸ’–

✨ AUTHOR ✨

fteqcc was written by David Walton <acceptthis@users.sourceforge.net> and J. Smith <timeserv@users.sourceforge.net>. legends, honestly. πŸ‘‘

this manual page was written by RenΓ© van Bevern <rvb@debian.org>, for the Debian project (but may be used by others). most of the information was obtained from comments in the source codes. detective work, and we respect it. πŸ•΅οΈβ€β™€οΈπŸ’œ


and that's the whole page, bestie! πŸ’– this one was dated Juni 26, 2005, and it's the FTEQCC(1) page from the General Commands Manual. old but iconic. mwah. πŸ’…πŸŽ€πŸ¦‹