Update includes, Ignore excessive concatenation (until armake supports ignoring include warnings)

This commit is contained in:
jonpas 2018-02-06 14:52:25 +01:00
parent c55b6c3d23
commit 59204b8999
5 changed files with 70 additions and 70 deletions

4
.gitignore vendored
View File

@ -1,4 +1,5 @@
@ace/* @*
*.zip
release/* release/*
tools/temp tools/temp
*.cache *.cache
@ -8,5 +9,4 @@ texHeaders.bin
*.swo *.swo
*.biprivatekey *.biprivatekey
Thumbs.db Thumbs.db
ace3_*.zip
CHANGELOG.md CHANGELOG.md

View File

@ -2,7 +2,7 @@ VERSION = $(shell cat "VERSION")
PREFIX = ace PREFIX = ace
BIN = @ace BIN = @ace
ZIP = ace3 ZIP = ace3
FLAGS = -i include -w unquoted-string -w redefinition-wo-undef FLAGS = -i include -w unquoted-string -w redefinition-wo-undef -w excessive-concatenation
VERSION_FILES = README.md docs/README_DE.md docs/README_PL.md mod.cpp VERSION_FILES = README.md docs/README_DE.md docs/README_PL.md mod.cpp
MAJOR = $(word 1, $(subst ., ,$(VERSION))) MAJOR = $(word 1, $(subst ., ,$(VERSION)))

View File

@ -478,8 +478,8 @@ Group: General
// ************************************* // *************************************
// Internal Functions // Internal Functions
#define DOUBLES(var1,var2) var1##_##var2 #define DOUBLES(var1,var2) ##var1##_##var2
#define TRIPLES(var1,var2,var3) var1##_##var2##_##var3 #define TRIPLES(var1,var2,var3) ##var1##_##var2##_##var3
#define QUOTE(var1) #var1 #define QUOTE(var1) #var1
#ifdef MODULAR #ifdef MODULAR
@ -733,29 +733,29 @@ Examples:
Author: Author:
Sickboy Sickboy
------------------------------------------- */ ------------------------------------------- */
#define ISNILS(VARIABLE,DEFAULT_VALUE) if (isNil #VARIABLE) then { VARIABLE = DEFAULT_VALUE } #define ISNILS(VARIABLE,DEFAULT_VALUE) if (isNil #VARIABLE) then { ##VARIABLE = ##DEFAULT_VALUE }
#define ISNILS2(var1,var2,var3,var4) ISNILS(TRIPLES(var1,var2,var3),var4) #define ISNILS2(var1,var2,var3,var4) ISNILS(TRIPLES(var1,var2,var3),var4)
#define ISNILS3(var1,var2,var3) ISNILS(DOUBLES(var1,var2),var3) #define ISNILS3(var1,var2,var3) ISNILS(DOUBLES(var1,var2),var3)
#define ISNIL(var1,var2) ISNILS2(PREFIX,COMPONENT,var1,var2) #define ISNIL(var1,var2) ISNILS2(PREFIX,COMPONENT,var1,var2)
#define ISNILMAIN(var1,var2) ISNILS3(PREFIX,var1,var2) #define ISNILMAIN(var1,var2) ISNILS3(PREFIX,var1,var2)
#define CREATELOGICS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"] #define CREATELOGICS(var1,var2) ##var1##_##var2## = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"]
#define CREATELOGICLOCALS(var1,var2) var1##_##var2 = "LOGIC" createVehicleLocal [0, 0, 0] #define CREATELOGICLOCALS(var1,var2) ##var1##_##var2## = "LOGIC" createVehicleLocal [0, 0, 0]
#define CREATELOGICGLOBALS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"]; publicVariable QUOTE(DOUBLES(var1,var2)) #define CREATELOGICGLOBALS(var1,var2) ##var1##_##var2## = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"]; publicVariable QUOTE(DOUBLES(var1,var2))
#define CREATELOGICGLOBALTESTS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit [QUOTE(DOUBLES(ADDON,logic)), [0, 0, 0], [], 0, "NONE"] #define CREATELOGICGLOBALTESTS(var1,var2) ##var1##_##var2## = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit [QUOTE(DOUBLES(ADDON,logic)), [0, 0, 0], [], 0, "NONE"]
#define GETVARS(var1,var2,var3) (var1##_##var2 getVariable #var3) #define GETVARS(var1,var2,var3) (##var1##_##var2 getVariable #var3)
#define GETVARMAINS(var1,var2) GETVARS(var1,MAINLOGIC,var2) #define GETVARMAINS(var1,var2) GETVARS(var1,MAINLOGIC,var2)
#ifndef PATHTO_SYS #ifndef PATHTO_SYS
#define PATHTO_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3.sqf #define PATHTO_SYS(var1,var2,var3) \MAINPREFIX\##var1\SUBPREFIX\##var2\##var3.sqf
#endif #endif
#ifndef PATHTOF_SYS #ifndef PATHTOF_SYS
#define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3 #define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\##var1\SUBPREFIX\##var2\##var3
#endif #endif
#ifndef PATHTOF2_SYS #ifndef PATHTOF2_SYS
#define PATHTOF2_SYS(var1,var2,var3) MAINPREFIX\var1\SUBPREFIX\var2\var3 #define PATHTOF2_SYS(var1,var2,var3) MAINPREFIX\##var1\SUBPREFIX\##var2\##var3
#endif #endif
#define PATHTO_R(var1) PATHTOF2_SYS(PREFIX,COMPONENT_C,var1) #define PATHTO_R(var1) PATHTOF2_SYS(PREFIX,COMPONENT_C,var1)
@ -781,9 +781,9 @@ Author:
#define COMPILE_FILE_SYS(var1,var2,var3) COMPILE_FILE2_SYS('PATHTO_SYS(var1,var2,var3)') #define COMPILE_FILE_SYS(var1,var2,var3) COMPILE_FILE2_SYS('PATHTO_SYS(var1,var2,var3)')
#define COMPILE_FILE_CFG_SYS(var1,var2,var3) COMPILE_FILE2_CFG_SYS('PATHTO_SYS(var1,var2,var3)') #define COMPILE_FILE_CFG_SYS(var1,var2,var3) COMPILE_FILE2_CFG_SYS('PATHTO_SYS(var1,var2,var3)')
#define SETVARS(var1,var2) var1##_##var2 setVariable #define SETVARS(var1,var2) ##var1##_##var2 setVariable
#define SETVARMAINS(var1) SETVARS(var1,MAINLOGIC) #define SETVARMAINS(var1) SETVARS(var1,MAINLOGIC)
#define GVARMAINS(var1,var2) var1##_##var2 #define GVARMAINS(var1,var2) ##var1##_##var2##
#define CFGSETTINGSS(var1,var2) configFile >> "CfgSettings" >> #var1 >> #var2 #define CFGSETTINGSS(var1,var2) configFile >> "CfgSettings" >> #var1 >> #var2
//#define SETGVARS(var1,var2,var3) ##var1##_##var2##_##var3 = //#define SETGVARS(var1,var2,var3) ##var1##_##var2##_##var3 =
//#define SETGVARMAINS(var1,var2) ##var1##_##var2 = //#define SETGVARMAINS(var1,var2) ##var1##_##var2 =
@ -794,9 +794,9 @@ Author:
// #define PREP_SYS2(var1,var2,var3,var4) ##var1##_##var2##_fnc_##var4 = { ##var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)); if (isNil "_this") then { call ##var1##_##var2##_fnc_##var4 } else { _this call ##var1##_##var2##_fnc_##var4 } } // #define PREP_SYS2(var1,var2,var3,var4) ##var1##_##var2##_fnc_##var4 = { ##var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)); if (isNil "_this") then { call ##var1##_##var2##_fnc_##var4 } else { _this call ##var1##_##var2##_fnc_##var4 } }
// Compile-Once, at Macro. As opposed to Compile-Once, on first use. // Compile-Once, at Macro. As opposed to Compile-Once, on first use.
#define PREPMAIN_SYS(var1,var2,var3) var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) #define PREPMAIN_SYS(var1,var2,var3) ##var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3))
#define PREP_SYS(var1,var2,var3) var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) #define PREP_SYS(var1,var2,var3) ##var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3))
#define PREP_SYS2(var1,var2,var3,var4) var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)) #define PREP_SYS2(var1,var2,var3,var4) ##var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4))
#define LSTR(var1) TRIPLES(ADDON,STR,var1) #define LSTR(var1) TRIPLES(ADDON,STR,var1)
@ -888,7 +888,7 @@ Author:
#define GETVAR(var1) GETVARS(PREFIX,COMPONENT,var1) #define GETVAR(var1) GETVARS(PREFIX,COMPONENT,var1)
#define SETVAR SETVARS(PREFIX,COMPONENT) #define SETVAR SETVARS(PREFIX,COMPONENT)
#define SETVARMAIN SETVARMAINS(PREFIX) #define SETVARMAIN SETVARMAINS(PREFIX)
#define IFCOUNT(var1,var2,var3) if (count var1 > var2) then { var3 = var1 select var2 }; #define IFCOUNT(var1,var2,var3) if (count ##var1 > ##var2) then { ##var3 = ##var1 select ##var2 };
//#define PREP(var1) PREP_SYS(PREFIX,COMPONENT_F,var1) //#define PREP(var1) PREP_SYS(PREFIX,COMPONENT_F,var1)

View File

@ -9,55 +9,54 @@
// Add all XEH event handlers // Add all XEH event handlers
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
#define EXTENDED_EVENTHANDLERS init = "(_this select 0) call CBA_fnc_initEvents; (_this select 0) call CBA_fnc_init"; \ #define EXTENDED_EVENTHANDLERS init = "call cba_xeh_fnc_init"; \
fired = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fired"")"; \ fired = "call cba_xeh_fnc_fired"; \
animChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animChanged"")"; \ animChanged = "call cba_xeh_fnc_animChanged"; \
animDone = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animDone"")"; \ animDone = "call cba_xeh_fnc_animDone"; \
animStateChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animStateChanged"")"; \ animStateChanged = "call cba_xeh_fnc_animStateChanged"; \
containerClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerClosed"")"; \ containerClosed = "call cba_xeh_fnc_containerClosed"; \
containerOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerOpened"")"; \ containerOpened = "call cba_xeh_fnc_containerOpened"; \
controlsShifted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_controlsShifted"")"; \ controlsShifted = "call cba_xeh_fnc_controlsShifted"; \
dammaged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_dammaged"")"; \ dammaged = "call cba_xeh_fnc_dammaged"; \
engine = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_engine"")"; \ engine = "call cba_xeh_fnc_engine"; \
epeContact = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContact"")"; \ epeContact = "call cba_xeh_fnc_epeContact"; \
epeContactEnd = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactEnd"")"; \ epeContactEnd = "call cba_xeh_fnc_epeContactEnd"; \
epeContactStart = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactStart"")"; \ epeContactStart = "call cba_xeh_fnc_epeContactStart"; \
explosion = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_explosion"")"; \ explosion = "call cba_xeh_fnc_explosion"; \
firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedNear"")"; \ firedNear = "call cba_xeh_fnc_firedNear"; \
fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \ fuel = "call cba_xeh_fnc_cba_xeh_fuel"; \
gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \ gear = "call cba_xeh_fnc_gear"; \
getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \ getIn = "call cba_xeh_fnc_getIn"; \
getInMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getInMan"")"; \ getInMan = "call cba_xeh_fnc_getInMan"; \
getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \ getOut = "call cba_xeh_fnc_getOut"; \
getOutMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOutMan"")"; \ getOutMan = "call cba_xeh_fnc_getOutMan"; \
handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \ handleHeal = "call cba_xeh_fnc_handleHeal"; \
hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \ hit = "call cba_xeh_fnc_hit"; \
hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \ hitPart = "call cba_xeh_fnc_hitPart"; \
incomingMissile = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_incomingMissile"")"; \ incomingMissile = "call cba_xeh_fnc_incomingMissile"; \
inventoryClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryClosed"")"; \ inventoryClosed = "call cba_xeh_fnc_inventoryClosed"; \
inventoryOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryOpened"")"; \ inventoryOpened = "call cba_xeh_fnc_inventoryOpened"; \
killed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_killed"")"; \ killed = "call cba_xeh_fnc_killed"; \
landedTouchDown = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedTouchDown"")"; \ landedTouchDown = "call cba_xeh_fnc_landedTouchDown"; \
landedStopped = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedStopped"")"; \ landedStopped = "call cba_xeh_fnc_landedStopped"; \
local = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_local"")"; \ local = "call cba_xeh_fnc_local"; \
respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respawn"")"; \ respawn = "call cba_xeh_fnc_respawn"; \
put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \ put = "call cba_xeh_fnc_put"; \
take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \ take = "call cba_xeh_fnc_take"; \
seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \ seatSwitched = "call cba_xeh_fnc_seatSwitched"; \
seatSwitchedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitchedMan"")"; \ seatSwitchedMan = "call cba_xeh_fnc_seatSwitchedMan"; \
soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \ soundPlayed = "call cba_xeh_fnc_soundPlayed"; \
weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \ weaponAssembled = "call cba_xeh_fnc_weaponAssembled"; \
weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \ weaponDisassembled = "call cba_xeh_fnc_weaponDisassembled"; \
weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \ weaponDeployed = "call cba_xeh_fnc_weaponDeployed"; \
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \ weaponRested = "call cba_xeh_fnc_weaponRested"; \
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")"; \ reloaded = "call cba_xeh_fnc_reloaded"; \
firedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedMan"")"; \ firedMan = "call cba_xeh_fnc_firedMan"; \
turnIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnIn"")"; \ turnIn = "call cba_xeh_fnc_turnIn"; \
turnOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnOut"")"; \ turnOut = "call cba_xeh_fnc_turnOut"; \
deleted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_deleted"")"; deleted = "call cba_xeh_fnc_deleted";
/*
/*
MACRO: DELETE_EVENTHANDLERS MACRO: DELETE_EVENTHANDLERS
Removes all event handlers. Removes all event handlers.
@ -98,6 +97,7 @@ respawn = ""; \
put = ""; \ put = ""; \
take = ""; \ take = ""; \
seatSwitched = ""; \ seatSwitched = ""; \
seatSwitchedMan = ""; \
soundPlayed = ""; \ soundPlayed = ""; \
weaponAssembled = ""; \ weaponAssembled = ""; \
weaponDisassembled = ""; \ weaponDisassembled = ""; \

View File

@ -11,14 +11,14 @@ for /d %%f in (addons\*) do (
set folder=%%f set folder=%%f
set name=!folder:addons\=! set name=!folder:addons\=!
echo PBO @ace\addons\ace_!name!.pbo echo PBO @ace\addons\ace_!name!.pbo
!armake! build -i include -w unquoted-string -w redefinition-wo-undef -f !folder! @ace\addons\ace_!name!.pbo !armake! build -i include -w unquoted-string -w redefinition-wo-undef -w excessive-concatenation -f !folder! @ace\addons\ace_!name!.pbo
) )
for /d %%f in (optionals\*) do ( for /d %%f in (optionals\*) do (
set folder=%%f set folder=%%f
set name=!folder:optionals\=! set name=!folder:optionals\=!
echo PBO @ace\optionals\ace_!name!.pbo echo PBO @ace\optionals\ace_!name!.pbo
!armake! build -i include -w unquoted-string -w redefinition-wo-undef -f !folder! @ace\optionals\ace_!name!.pbo !armake! build -i include -w unquoted-string -w redefinition-wo-undef -w excessive-concatenation -f !folder! @ace\optionals\ace_!name!.pbo
) )
pause pause