-
-
Notifications
You must be signed in to change notification settings - Fork 46
Preprocessor
JezuzLizard edited this page Oct 8, 2023
·
4 revisions
gsc-tool includes a preprocessor for all supported games.
It supports the following statements:
#define
#undef
#if
#else
#elif
#ifdef
#ifndef
#endif
#inline
#Define supports plain names(#define DEBUG), objects(#define DEBUG true), and function macros.
## can be used to concatenate strings.
Undefines a macro(#UNDEF DEBUG).
Used to evaluate plain and/or object macros.
#if and #elif support the following operators:
?:, &&, ||, |, ^, &, <<, >>, ==, !=, <=, >=, <, >, *, /, +, %, -, !, ~
and the following types:
bool, int, float, string
Allows the preprocessor to import macros from a .gsh file(#inline maps\mp\gamelogic;).
https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-directives?view=msvc-170