Difference between revisions of "Precompiler definitions"

From FTE
Jump to: navigation, search
(#pragma TARGET)
(#pragma PROGS_DAT)
Line 67: Line 67:
  
 
===#pragma PROGS_DAT===
 
===#pragma PROGS_DAT===
 +
<b>Syntax</b>: #pragma PROGS_DAT <progsfile> <br />
 +
 +
Changes the destination file you wish to compile to. <progsfile> contains the new file name.<br />
 +
 +
Example:
 +
#ifdef MONSTERS
 +
    #pragma PROGS_DAT monsters.dat
 +
    #message FTEQCC will now compile to monsters.dat
 +
#else
 +
    #pragma PROGS_DAT nomonsters.dat
 +
    #message FTEQCC will now compile to nomonsters.dat
 +
#endif
  
 
===#pragma keyword and #pragma flag===
 
===#pragma keyword and #pragma flag===
  
 
===#pragma warning===
 
===#pragma warning===

Revision as of 20:26, 30 October 2005

Definitions

#define

#undef

Control Logic

#ifdef

#ifndef

#if

#else

#endif

Something

#message

#warning

#error

File things

#include

#includelist

#endlist

#output

Depreciated, use #pragma PROGS_DAT instead.

Second file things

#eof

#forcecrc

#copyright

#datafile

#pack

Pragma (#pragma)

#pragma DONT_COMPILE_THIS_FILE

This pragma is parsed but ignored by FTEQCC so PREQCC-using code can compile cleanly.

#pragma COPYRIGHT

#pragma TARGET

Syntax: #pragma TARGET <target>

Switches compiled progs to a specific target type.

<target> can be the following:

  • ID, STANDARD: standard Quake progs
  • KK7: kkqwsv progs
  • H2, HEXEN2: Hexen 2 progs, version 6 but different CRC algorithm
  • FTE: FTE progs
  • DEBUG, FTEDEBUG: FTE progs with debug information

It is not recommended to switch target types during compilation.

#pragma PROGS_SRC

This pragma is parsed but ignored by FTEQCC so PREQCC-using code can compile cleanly.

#pragma PROGS_DAT

Syntax: #pragma PROGS_DAT <progsfile>

Changes the destination file you wish to compile to. <progsfile> contains the new file name.

Example:

#ifdef MONSTERS
   #pragma PROGS_DAT monsters.dat
   #message FTEQCC will now compile to monsters.dat
#else
   #pragma PROGS_DAT nomonsters.dat
   #message FTEQCC will now compile to nomonsters.dat
#endif

#pragma keyword and #pragma flag

#pragma warning