mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update includes, Ignore excessive concatenation (until armake supports ignoring include warnings)
This commit is contained in:
parent
c55b6c3d23
commit
59204b8999
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
@ace/*
|
||||
@*
|
||||
*.zip
|
||||
release/*
|
||||
tools/temp
|
||||
*.cache
|
||||
@ -8,5 +9,4 @@ texHeaders.bin
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
Thumbs.db
|
||||
ace3_*.zip
|
||||
CHANGELOG.md
|
||||
|
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ VERSION = $(shell cat "VERSION")
|
||||
PREFIX = ace
|
||||
BIN = @ace
|
||||
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
|
||||
|
||||
MAJOR = $(word 1, $(subst ., ,$(VERSION)))
|
||||
|
@ -478,8 +478,8 @@ Group: General
|
||||
|
||||
// *************************************
|
||||
// Internal Functions
|
||||
#define DOUBLES(var1,var2) var1##_##var2
|
||||
#define TRIPLES(var1,var2,var3) var1##_##var2##_##var3
|
||||
#define DOUBLES(var1,var2) ##var1##_##var2
|
||||
#define TRIPLES(var1,var2,var3) ##var1##_##var2##_##var3
|
||||
#define QUOTE(var1) #var1
|
||||
|
||||
#ifdef MODULAR
|
||||
@ -733,29 +733,29 @@ Examples:
|
||||
Author:
|
||||
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 ISNILS3(var1,var2,var3) ISNILS(DOUBLES(var1,var2),var3)
|
||||
#define ISNIL(var1,var2) ISNILS2(PREFIX,COMPONENT,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 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 CREATELOGICGLOBALTESTS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit [QUOTE(DOUBLES(ADDON,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 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 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)
|
||||
|
||||
#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
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#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_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 GVARMAINS(var1,var2) var1##_##var2
|
||||
#define GVARMAINS(var1,var2) ##var1##_##var2##
|
||||
#define CFGSETTINGSS(var1,var2) configFile >> "CfgSettings" >> #var1 >> #var2
|
||||
//#define SETGVARS(var1,var2,var3) ##var1##_##var2##_##var3 =
|
||||
//#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 } }
|
||||
|
||||
// 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 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 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_SYS2(var1,var2,var3,var4) ##var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4))
|
||||
|
||||
#define LSTR(var1) TRIPLES(ADDON,STR,var1)
|
||||
|
||||
@ -888,7 +888,7 @@ Author:
|
||||
#define GETVAR(var1) GETVARS(PREFIX,COMPONENT,var1)
|
||||
#define SETVAR SETVARS(PREFIX,COMPONENT)
|
||||
#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)
|
||||
|
||||
|
@ -9,55 +9,54 @@
|
||||
// Add all XEH event handlers
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define EXTENDED_EVENTHANDLERS init = "(_this select 0) call CBA_fnc_initEvents; (_this select 0) call CBA_fnc_init"; \
|
||||
fired = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fired"")"; \
|
||||
animChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animChanged"")"; \
|
||||
animDone = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animDone"")"; \
|
||||
animStateChanged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_animStateChanged"")"; \
|
||||
containerClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerClosed"")"; \
|
||||
containerOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_containerOpened"")"; \
|
||||
controlsShifted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_controlsShifted"")"; \
|
||||
dammaged = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_dammaged"")"; \
|
||||
engine = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_engine"")"; \
|
||||
epeContact = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContact"")"; \
|
||||
epeContactEnd = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactEnd"")"; \
|
||||
epeContactStart = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_epeContactStart"")"; \
|
||||
explosion = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_explosion"")"; \
|
||||
firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedNear"")"; \
|
||||
fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \
|
||||
gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \
|
||||
getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \
|
||||
getInMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getInMan"")"; \
|
||||
getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \
|
||||
getOutMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOutMan"")"; \
|
||||
handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \
|
||||
hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \
|
||||
hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \
|
||||
incomingMissile = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_incomingMissile"")"; \
|
||||
inventoryClosed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryClosed"")"; \
|
||||
inventoryOpened = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_inventoryOpened"")"; \
|
||||
killed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_killed"")"; \
|
||||
landedTouchDown = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedTouchDown"")"; \
|
||||
landedStopped = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_landedStopped"")"; \
|
||||
local = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_local"")"; \
|
||||
respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respawn"")"; \
|
||||
put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \
|
||||
take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \
|
||||
seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \
|
||||
seatSwitchedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitchedMan"")"; \
|
||||
soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \
|
||||
weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \
|
||||
weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \
|
||||
weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \
|
||||
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \
|
||||
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")"; \
|
||||
firedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_firedMan"")"; \
|
||||
turnIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnIn"")"; \
|
||||
turnOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_turnOut"")"; \
|
||||
deleted = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_deleted"")";
|
||||
#define EXTENDED_EVENTHANDLERS init = "call cba_xeh_fnc_init"; \
|
||||
fired = "call cba_xeh_fnc_fired"; \
|
||||
animChanged = "call cba_xeh_fnc_animChanged"; \
|
||||
animDone = "call cba_xeh_fnc_animDone"; \
|
||||
animStateChanged = "call cba_xeh_fnc_animStateChanged"; \
|
||||
containerClosed = "call cba_xeh_fnc_containerClosed"; \
|
||||
containerOpened = "call cba_xeh_fnc_containerOpened"; \
|
||||
controlsShifted = "call cba_xeh_fnc_controlsShifted"; \
|
||||
dammaged = "call cba_xeh_fnc_dammaged"; \
|
||||
engine = "call cba_xeh_fnc_engine"; \
|
||||
epeContact = "call cba_xeh_fnc_epeContact"; \
|
||||
epeContactEnd = "call cba_xeh_fnc_epeContactEnd"; \
|
||||
epeContactStart = "call cba_xeh_fnc_epeContactStart"; \
|
||||
explosion = "call cba_xeh_fnc_explosion"; \
|
||||
firedNear = "call cba_xeh_fnc_firedNear"; \
|
||||
fuel = "call cba_xeh_fnc_cba_xeh_fuel"; \
|
||||
gear = "call cba_xeh_fnc_gear"; \
|
||||
getIn = "call cba_xeh_fnc_getIn"; \
|
||||
getInMan = "call cba_xeh_fnc_getInMan"; \
|
||||
getOut = "call cba_xeh_fnc_getOut"; \
|
||||
getOutMan = "call cba_xeh_fnc_getOutMan"; \
|
||||
handleHeal = "call cba_xeh_fnc_handleHeal"; \
|
||||
hit = "call cba_xeh_fnc_hit"; \
|
||||
hitPart = "call cba_xeh_fnc_hitPart"; \
|
||||
incomingMissile = "call cba_xeh_fnc_incomingMissile"; \
|
||||
inventoryClosed = "call cba_xeh_fnc_inventoryClosed"; \
|
||||
inventoryOpened = "call cba_xeh_fnc_inventoryOpened"; \
|
||||
killed = "call cba_xeh_fnc_killed"; \
|
||||
landedTouchDown = "call cba_xeh_fnc_landedTouchDown"; \
|
||||
landedStopped = "call cba_xeh_fnc_landedStopped"; \
|
||||
local = "call cba_xeh_fnc_local"; \
|
||||
respawn = "call cba_xeh_fnc_respawn"; \
|
||||
put = "call cba_xeh_fnc_put"; \
|
||||
take = "call cba_xeh_fnc_take"; \
|
||||
seatSwitched = "call cba_xeh_fnc_seatSwitched"; \
|
||||
seatSwitchedMan = "call cba_xeh_fnc_seatSwitchedMan"; \
|
||||
soundPlayed = "call cba_xeh_fnc_soundPlayed"; \
|
||||
weaponAssembled = "call cba_xeh_fnc_weaponAssembled"; \
|
||||
weaponDisassembled = "call cba_xeh_fnc_weaponDisassembled"; \
|
||||
weaponDeployed = "call cba_xeh_fnc_weaponDeployed"; \
|
||||
weaponRested = "call cba_xeh_fnc_weaponRested"; \
|
||||
reloaded = "call cba_xeh_fnc_reloaded"; \
|
||||
firedMan = "call cba_xeh_fnc_firedMan"; \
|
||||
turnIn = "call cba_xeh_fnc_turnIn"; \
|
||||
turnOut = "call cba_xeh_fnc_turnOut"; \
|
||||
deleted = "call cba_xeh_fnc_deleted";
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
MACRO: DELETE_EVENTHANDLERS
|
||||
|
||||
Removes all event handlers.
|
||||
@ -98,6 +97,7 @@ respawn = ""; \
|
||||
put = ""; \
|
||||
take = ""; \
|
||||
seatSwitched = ""; \
|
||||
seatSwitchedMan = ""; \
|
||||
soundPlayed = ""; \
|
||||
weaponAssembled = ""; \
|
||||
weaponDisassembled = ""; \
|
||||
|
4
make.bat
4
make.bat
@ -11,14 +11,14 @@ for /d %%f in (addons\*) do (
|
||||
set folder=%%f
|
||||
set name=!folder:addons\=!
|
||||
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 (
|
||||
set folder=%%f
|
||||
set name=!folder:optionals\=!
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user