1
0

XEH_PREP.sqf 1.1 KB

12345678910111213141516171819202122
  1. // PREP Macros
  2. // Basically this is just a way to have short hand produce
  3. // "RD501_Zeus\functions\fnc_moduleJammerSettings.sqf","rd501_zeus_fnc_moduleJammerSettings"] call CBA_fnc_compileFunction;
  4. // from
  5. // PREP(moduleJammerSettings);
  6. // Why?
  7. // Need to register functions somehow, normal arma config based is slow since it reads from disc, cba is cached in memory.
  8. // So we use CBA functions, macros are just a nice thing to have for ensuring convention.
  9. // So just add your stuff to PREP(name) where your file is in functions, and is called fnc_name.sqf
  10. // NOTE: this adds a zeus prefix to the function call (rd501_zeus_fnc vs rd501_fnc)
  11. #define PREP_CONCAT(a,b) a##b
  12. #define PREP_CONCAT_3(a,b,c) PREP_CONCAT(PREP_CONCAT(a,b),c)
  13. #define PREP_PATH PREP_CONCAT_3(RD501_Zeus,\,functions)
  14. #define PREP_QUOTE(quoted) #quoted
  15. #define PREP(func)\
  16. [PREP_QUOTE(PREP_CONCAT_3(PREP_PATH,\,PREP_CONCAT_3(fnc_,func,.sqf))),PREP_QUOTE(PREP_CONCAT(rd501_zeus_fnc_,func))] call CBA_fnc_compileFunction
  17. PREP(moduleJammerSettings);
  18. PREP(ui_jammerSettings);
  19. PREP(moduleJammerClearAll);
  20. PREP(moduleVolatile);
  21. PREP(ui_volatileSettings);