Skip to content

Commit

Permalink
Merge pull request #3670 from acemod/useQuotedFuncMacros
Browse files Browse the repository at this point in the history
Use new quoted function macros
  • Loading branch information
commy2 committed May 30, 2016
2 parents 882aa26 + ccaec31 commit 2727754
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_unloadPerson.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#include "script_component.hpp"

#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
#define GROUP_SWITCH_ID QFUNC(loadPerson)

params ["_unit"];

Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_unloadPersonLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
#include "script_component.hpp"

#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
#define GROUP_SWITCH_ID QFUNC(loadPerson)

params ["_unit", "_vehicle", ["_unloader", objNull]];
TRACE_3("params",_unit,_vehicle,_unloader);
Expand Down
2 changes: 1 addition & 1 deletion addons/explosives/CfgModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class ACE_ModuleExplosive: ACE_Module {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(Module_DisplayName);
function = QUOTE(FUNC(module));
function = QFUNC(module);
scope = 2;
isGlobal = 1;
isSingular = 1;
Expand Down
2 changes: 1 addition & 1 deletion addons/fastroping/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CfgVehicles {
displayName = CSTRING(Module_FRIES_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_FRIES_ca.paa));
category = "ACE";
function = QUOTE(FUNC(moduleEquipFRIES));
function = QFUNC(moduleEquipFRIES);
functionPriority = 10;
isGlobal = 0;
isTriggerActivated = 0;
Expand Down
2 changes: 1 addition & 1 deletion addons/frag/functions/fnc_spallTrack.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (count _intersectsWith > 0) then {
if(!(_x in _foundObjects)) then {
// diag_log text format["Adding HP: %1", _x];
_index = (count GVAR(spallHPData));
_hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]];
_hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QFUNC(spallHP), _index]];
_foundObjects set[(count _foundObjects), _x];
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
Expand Down
2 changes: 1 addition & 1 deletion addons/hitreactions/functions/fnc_fallDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (_unit == ACE_player) then {
};

// play scream sound
if (!isNil QUOTE(EFUNC(medical,playInjuredSound))) then {
if (!isNil QEFUNC(medical,playInjuredSound)) then {
[_unit] call EFUNC(medical,playInjuredSound);
};

Expand Down
3 changes: 0 additions & 3 deletions addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)

#define QFUNC(var1) QUOTE(DFUNC(var1))
#define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2))

#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2)

#define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)]
Expand Down
10 changes: 5 additions & 5 deletions addons/medical/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class CfgVehicles {
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleBasicMedicalSettings));
function = QFUNC(moduleBasicMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
Expand Down Expand Up @@ -200,7 +200,7 @@ class CfgVehicles {
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAdvancedMedicalSettings));
function = QFUNC(moduleAdvancedMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
Expand Down Expand Up @@ -366,7 +366,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicRoles));
function = QFUNC(moduleAssignMedicRoles);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
Expand Down Expand Up @@ -413,7 +413,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalVehicle));
function = QFUNC(moduleAssignMedicalVehicle);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
Expand Down Expand Up @@ -457,7 +457,7 @@ class CfgVehicles {
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalFacility));
function = QFUNC(moduleAssignMedicalFacility);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
Expand Down
2 changes: 1 addition & 1 deletion addons/missionmodules/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CfgVehicles {
displayName = CSTRING(AmbianceSounds_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa));
category = "ACE_missionModules";
function = QUOTE(FUNC(moduleAmbianceSound));
function = QFUNC(moduleAmbianceSound);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
Expand Down
2 changes: 1 addition & 1 deletion addons/nightvision/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CfgVehicles {
displayName = CSTRING(Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_ca.paa));
category = "ACE";
function = QUOTE(FUNC(initModule));
function = QFUNC(initModule);
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
Expand Down
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_useItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ params ["_unit", "_item"];
TRACE_2("params",_unit,_item);

if ([_unit, _item] call EFUNC(common,hasItem)) exitWith {
[[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
[[_unit, _item], QEFUNC(common,useItem), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
[true, _unit];
};

Expand Down

0 comments on commit 2727754

Please sign in to comment.