From e72742da3112f655642a1a177fd94d2b635aba69 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 14 Feb 2015 08:26:30 +0100 Subject: [PATCH] add macros for transport cargo config --- addons/flashsuppressors/CfgVehicles.hpp | 5 ----- addons/magazines/CfgVehicles.hpp | 5 ----- addons/main/script_macros.hpp | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/addons/flashsuppressors/CfgVehicles.hpp b/addons/flashsuppressors/CfgVehicles.hpp index 40dc505d64..a973518b91 100644 --- a/addons/flashsuppressors/CfgVehicles.hpp +++ b/addons/flashsuppressors/CfgVehicles.hpp @@ -1,9 +1,4 @@ -#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ - name = #ITEM; \ - count = COUNT; \ -} - class CfgVehicles { class NATO_Box_Base; class Box_NATO_Support_F: NATO_Box_Base { diff --git a/addons/magazines/CfgVehicles.hpp b/addons/magazines/CfgVehicles.hpp index b78eb71abc..a7c2654d71 100644 --- a/addons/magazines/CfgVehicles.hpp +++ b/addons/magazines/CfgVehicles.hpp @@ -1,9 +1,4 @@ -#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \ - magazine = #MAGAZINE; \ - count = COUNT; \ -} - class CfgVehicles { class NATO_Box_Base; class Box_NATO_Wps_F: NATO_Box_Base { diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 3b59e8b373..cc589aac3e 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -199,6 +199,22 @@ #define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3) +#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ + weapon = #WEAPON; \ + count = COUNT; \ +} + +#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ + name = #ITEM; \ + count = COUNT; \ +} + +#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \ + magazine = #MAGAZINE; \ + count = COUNT; \ +} + + #ifdef DISABLE_COMPILE_CACHE #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) #else