Files

33 lines
2.0 KiB
C++
Raw Permalink Normal View History

#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"
#include "script_debug.hpp"
// Disables compile cache when debug mode is enabled. Makes file patching work.
#ifdef DEBUG_MODE_FULL
#define DISABLE_COMPILE_CACHE
#endif
/*
// New PREP macros - including a subfolder variant which will enable me to organise my functions for my own sanity
#undef PREP
#ifdef DISABLE_COMPILE_CACHE
// no compile cache
#define PREP(function) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,function).sqf)
#define PREP_S(function,subfolder) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers QPATHTOF(functions\subfolder\DOUBLES(fnc,function).sqf)
#else
// compile cache
#define PREP(function) [QPATHTOF(functions\DOUBLES(fnc,function).sqf), QFUNC(function)] call CBA_fnc_compileFunction
#define PREP_S(function,subfolder) [QPATHTOF(functions\subfolder\DOUBLES(fnc,function).sqf), QFUNC(function)] call CBA_fnc_compileFunction
#endif
*/
// Utilising helper PREP maccro redefines from https://github.com/flufflesamy/CBA-Tutorial/
// CBA XEH PREP macro override for when compile cache is disabled.
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(function) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\DOUBLES(fnc,function).sqf'
#define PREP_S(function,subfolder) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\subfolder\DOUBLES(fnc,function).sqf'
#else
#undef PREP
#define PREP(function) ['\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\DOUBLES(fnc,function).sqf', 'TRIPLES(ADDON,fnc,function)'] call SLX_XEH_COMPILE_NEW
#define PREP_S(function,subfolder) ['\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\subfolder\DOUBLES(fnc,function).sqf', 'TRIPLES(ADDON,fnc,function)'] call SLX_XEH_COMPILE_NEW
#endif