X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil-pre.qh;h=f246200378ff5adcccb374212c0972797f4c9661;hp=4e8e1b59c8d35ac69ea37fe0f410f74eb1f79d92;hb=5e71f197737816c83f7cb97a7473a1eed43895a7;hpb=f5991c3713189cd59fad4249bfada408e4bdfe32 diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 4e8e1b59c8..f246200378 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -1,23 +1,44 @@ -#ifdef FTEQCC -#pragma flag enable subscope -#pragma flag enable lo +#ifndef UTIL_PRE_H +#define UTIL_PRE_H + +#ifndef NOCOMPAT + #define COMPAT_NO_MOD_IS_XONOTIC #endif -// FTEQCC can do this -// #define HAVE_YO_DAWG_CPP -// No, this is an ex-"feature" and non-C11. +#ifndef QCC_SUPPORT_ACCUMULATE + #ifdef GMQCC + #define QCC_SUPPORT_ACCUMULATE + #endif +#endif -#ifndef NOCOMPAT -//# define WORKAROUND_XON010 -//# define COMPAT_XON050_ENGINE -# define COMPAT_NO_MOD_IS_XONOTIC -# define COMPAT_XON060_DONTCRASH_CHECKPVS +#ifndef QCC_SUPPORT_NIL + #ifdef GMQCC + #define QCC_SUPPORT_NIL + #endif +#endif + +#ifndef QCC_SUPPORT_INT + #define int float + + #define stoi(s) stof(s) + #define stob(s) stof(s) + #define itos(i) ftos(i) +#else + #define stoi(s) ((int) stof(s)) + #define stob(s) ((bool) stof(s)) + #define itos(i) ftos(i) #endif -#ifdef FTEQCC -#ifdef WATERMARK -const string FTEQCC_SUCKS_WATERMARKS_THROUGH_C60_FULLERENES = WATERMARK(); -#undef WATERMARK -#define WATERMARK FTEQCC_SUCKS_WATERMARKS_THROUGH_C60_FULLERENES +#ifndef QCC_SUPPORT_BOOL + #define bool float + + // Boolean Constants + const int true = 1; + const int false = 0; #endif + +// Transitional aliases +[[deprecated("use true")]] [[alias("true")]] const bool TRUE; +[[deprecated("use false")]] [[alias("false")]] const bool FALSE; + #endif