Skip to content

Commit

Permalink
HEMTT - Fix warnings regarding macro redefinition (#434)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Title

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.

---------

Co-authored-by: Blue <[email protected]>
  • Loading branch information
MiszczuZPolski and BlueTheKing authored Nov 15, 2023
1 parent 2d2c6bd commit dc680d6
Show file tree
Hide file tree
Showing 280 changed files with 1,039 additions and 1,313 deletions.
14 changes: 7 additions & 7 deletions addons/airway/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ACE_Medical_Treatment_Actions {
medicRequired = QGVAR(medLvl_Larynxtubus);
treatmentTime = QGVAR(Larynxtubus_time);
items[] = {"kat_larynx"};
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Guedeltubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus'));
callbackSuccess = QFUNC(treatmentAdvanced_airway);
callbackFailure = "";
callbackProgress = "";
Expand All @@ -30,14 +30,14 @@ class ACE_Medical_Treatment_Actions {
medicRequired = QGVAR(medLvl_Larynxtubus);
treatmentTime = QGVAR(Larynxtubus_time);
items[] = {};
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus'));
callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem);
};
class Guedeltubus: Larynxtubus {
displayName = CSTRING(Guedeltubus_Display);
medicRequired = QGVAR(medLvl_Guedeltubus);
treatmentTime = QGVAR(Guedeltubus_time);
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus'));
items[] = {"kat_guedel"};
icon = QPATHTOF(ui\guedel.paa);
callbackSuccess = QFUNC(treatmentAdvanced_airway);
Expand All @@ -49,14 +49,14 @@ class ACE_Medical_Treatment_Actions {
treatmentTime = QGVAR(Guedeltubus_time);
items[] = {};
icon = QPATHTOF(ui\guedel.paa);
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Guedeltubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus'));
callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem);
};
class Accuvac: Larynxtubus {
displayName = "Accuvac";
treatmentTime = QGVAR(Accuvac_time);
items[] = {"kat_accuvac"};
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus'));
icon = QPATHTOF(ui\accuvac.paa);
consumeItem = 0;
medicRequired = QGVAR(medLvl_Accuvac);
Expand All @@ -71,7 +71,7 @@ class ACE_Medical_Treatment_Actions {
medicRequired = 0;
items[] = {};
icon = "";
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && !(_patient getVariable [ARR_2(QQGVAR(overstretch), false)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus'));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && !(_patient getVariable [ARR_2(QQGVAR(overstretch),false)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus'));
callbackSuccess = QFUNC(treatmentAdvanced_overstretchHead);
};
class BeginHeadTurning: Larynxtubus {
Expand All @@ -81,7 +81,7 @@ class ACE_Medical_Treatment_Actions {
medicRequired = 0;
items[] = {};
icon = "";
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Larynxtubus') && (!(_patient getVariable [ARR_2(QQGVAR(airway_item), '')] == 'Guedeltubus') || !(missionNamespace getVariable [ARR_2(QQGVAR(block_headTurning_ifAirwayItem),true)])));
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && (!(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') || !(missionNamespace getVariable [ARR_2(QQGVAR(block_headTurning_ifAirwayItem),true)])));
callbackSuccess = QFUNC(startHeadTurning);
sounds[] = {};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/airway/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Extended_PreInit_EventHandlers {
class Extended_Init_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE([ARR_2((_this select 0), false)] call FUNC(init));
init = QUOTE([ARR_2((_this select 0),false)] call FUNC(init));
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_checkAirway.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Checks need of airway management
Expand Down
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_checkRecovery.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: MiszczuZPolski
* Checks if guedel or larynx was placed before
Expand Down
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_handleAirway.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Handler for airway damage.
Expand Down
4 changes: 2 additions & 2 deletions addons/airway/functions/fnc_handlePuking.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam, edited by MiszczuZPolski
* Called when a unit enters the unconscious state. Will add a FrameHandler for puking while unconscious.
Expand Down Expand Up @@ -34,7 +34,7 @@ _unit setVariable ["kat_pukeActive_PFH", true];
};

if (GVAR(occlusion_cooldownPeriod) > 0 && {(_unit getVariable [QGVAR(clearedTime), 0] > 0) && ((_unit getVariable [QGVAR(clearedTime), 0]) + GVAR(occlusion_cooldownPeriod)) > CBA_missionTime}) exitWith {};

if (random(100) <= GVAR(probability_occluded)) then {
if !(_unit getVariable [QGVAR(occluded), false]) then {
_unit setVariable [QGVAR(occluded), true, true];
Expand Down
4 changes: 2 additions & 2 deletions addons/airway/functions/fnc_init.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Initializes unit variables.
Expand Down Expand Up @@ -27,4 +27,4 @@ _unit setVariable [QGVAR(overstretch), false, true];
_unit setVariable [QGVAR(recovery), false, true];
_unit setVariable [QGVAR(airway_item), "", true];
_unit setVariable [QGVAR(clearedTime), 0, true];
KAT_forceWakeup = false;
KAT_forceWakeup = false;
10 changes: 5 additions & 5 deletions addons/airway/functions/fnc_startHeadTurning.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Blue
* Begin head turning
Expand Down Expand Up @@ -31,7 +31,7 @@ GVAR(HeadTurnCancel_MouseID) = [0xF0, [false, false, false], {
}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler;

ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening

if (dialog) then { // If another dialog is open (medical menu) close it
closeDialog 0;
};
Expand Down Expand Up @@ -83,7 +83,7 @@ GVAR(headTurn_timeOut) = true;
params ["_patient"];

!(_patient getVariable [QGVAR(headTurningActive), false]);
}, {}, [_patient, _medic], GVAR(HeadTurn_Interval),
}, {}, [_patient, _medic], GVAR(HeadTurn_Interval),
{
params ["_patient", "_medic"];

Expand All @@ -106,7 +106,7 @@ GVAR(headTurn_timeOut) = true;

}] call CBA_fnc_waitUntilAndExecute;
};

if (GVAR(loopHeadturning)) then {
[QACEGVAR(common,switchMove), [_medic, "kat_headTurn"]] call CBA_fnc_globalEvent;
GVAR(loopHeadturning) = false;
Expand All @@ -121,4 +121,4 @@ GVAR(headTurn_timeOut) = true;
}, 0, [_medic, _patient, _notInVehicle]] call CBA_fnc_addPerFrameHandler;

[{GVAR(headTurn_timeOut) = false;}, [], 1] call CBA_fnc_waitAndExecute;
}, [_medic, _patient, _notInVehicle], 2] call CBA_fnc_waitAndExecute;
}, [_medic, _patient, _notInVehicle], 2] call CBA_fnc_waitAndExecute;
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Airway Management for occluding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Airway Management for occluding local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Blue
* Play Accuvac suction sound
Expand Down Expand Up @@ -30,6 +30,6 @@ private _accuvacSuction = playSound3D [QPATHTOF_SOUND(sounds\suction.wav), _pati
!dialog;
}, {
params ["_accuvacSuction"];

stopSound _accuvacSuction;
}, [_accuvacSuction], 5.7] call CBA_fnc_waitUntilAndExecute;
}, [_accuvacSuction], 5.7] call CBA_fnc_waitUntilAndExecute;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: MiszczuZPolski
* Set patient into recovery position preventing further airway occlusion.
Expand All @@ -19,4 +19,4 @@
params ["_medic", "_patient"];

[QGVAR(cancelRecoveryPositionLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent;
[_patient, "ainjppnemstpsnonwrfldnon", 2] call ACEFUNC(common,doAnimation);
[_patient, "ainjppnemstpsnonwrfldnon", 2] call ACEFUNC(common,doAnimation);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: MiszczuZPolski
* Local callback for set patient from recovery position.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: MiszczuZPolski
* Set patient into recovery position preventing further airway occlusion.
Expand All @@ -21,4 +21,4 @@ params ["_medic", "_patient"];
[_patient, "activity", LSTRING(RecoveryPosition_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog);

[QGVAR(recoveryPositionLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent;
[_patient, "kat_recoveryPosition", 2] call ACEFUNC(common,doAnimation);
[_patient, "kat_recoveryPosition", 2] call ACEFUNC(common,doAnimation);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: MiszczuZPolski
* Local callback for set patient into recovery position.
Expand Down Expand Up @@ -27,7 +27,7 @@ private _output = LLSTRING(Recovery_Info);

[{
params ["_medic", "_patient"];
(_patient call ACEFUNC(medical_status,isBeingDragged)) || (_patient call ACEFUNC(medical_status,isBeingCarried)) || !(isNull objectParent _patient);
_patient call ACEFUNC(medical_status,isBeingDragged) || _patient call ACEFUNC(medical_status,isBeingCarried) || !(isNull objectParent _patient);
}, {
params ["_medic", "_patient"];
_patient setVariable [QGVAR(recovery), false, true];
Expand All @@ -36,10 +36,10 @@ private _output = LLSTRING(Recovery_Info);
_output = LLSTRING(Recovery_Cancel);
[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured);
}, [_medic, _patient], 3600, {
params ["_medic","patient"];
params ["_medic", "_patient"];
_patient setVariable [QGVAR(recovery), false, true];
_patient setVariable [QGVAR(overstretch), false, true];

_output = LLSTRING(Recovery_Cancel);
[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured);
}] call CBA_fnc_waitUntilAndExecute;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Miss Heda
* Removing Guedeltubus or KingLT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Miss Heda
* Removing Guedeltubus & KingLT
Expand Down Expand Up @@ -28,9 +28,9 @@ if (_item isEqualTo "Larynxtubus") then {
};

if !(GVAR(ReusableAirwayItems)) exitwith {};

if (_item isEqualTo "Larynxtubus") then {
[_medic, "kat_larynx"] call ACEFUNC(common,addToInventory);
} else {
[_medic, "kat_guedel"] call ACEFUNC(common,addToInventory);
};
};
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_treatmentAdvanced_airway.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Airway Management for collapsing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam, edited by MiszczuZPolski & Miss Heda
* Airway Management for collapsing local
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Katalam
* Overstretch the head of the patient for airway management without items
Expand Down
1 change: 0 additions & 1 deletion addons/airway/functions/script_component.hpp

This file was deleted.

59 changes: 0 additions & 59 deletions addons/airway/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,3 @@
#endif

#include "\x\kat\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"

#include "\a3\ui_f\hpp\defineResincl.inc"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
#include "\a3\ui_f\hpp\defineCommonColors.inc"

#define POS_X(N) ((N) * GUI_GRID_W + GUI_GRID_CENTER_X)
#define POS_Y(N) ((N) * GUI_GRID_H + GUI_GRID_CENTER_Y)
#define POS_W(N) ((N) * GUI_GRID_W)
#define POS_H(N) ((N) * GUI_GRID_H)

#define IDD_MEDICAL_MENU 38580

#define IDC_TITLE 1200
#define IDC_TRIAGE 1300
#define IDC_EXAMINE 1310
#define IDC_BANDAGE 1320
#define IDC_MEDICATION 1330
#define IDC_AIRWAY 1340
#define IDC_ADVANCED 1350
#define IDC_DRAG 1360
#define IDC_TOGGLE 1370

#define IDC_TRIAGE_CARD 1400
#define IDC_INJURIES 1410
#define IDC_ACTIVITY 1420
#define IDC_QUICKVIEW 1430

#define IDC_ACTION_1 1500
#define IDC_ACTION_2 1510
#define IDC_ACTION_3 1520
#define IDC_ACTION_4 1530
#define IDC_ACTION_5 1540
#define IDC_ACTION_6 1550
#define IDC_ACTION_7 1560
#define IDC_ACTION_8 1570
#define IDC_ACTION_9 1580

#define IDCS_ACTION_BUTTONS [IDC_ACTION_1, IDC_ACTION_2, IDC_ACTION_3, IDC_ACTION_4, IDC_ACTION_5, IDC_ACTION_6, IDC_ACTION_7, IDC_ACTION_8, IDC_ACTION_9]

#define IDC_BODY_GROUP 6000
#define IDC_BODY_HEAD 6005
#define IDC_BODY_TORSO 6010
#define IDC_BODY_ARMLEFT 6015
#define IDC_BODY_ARMRIGHT 6020
#define IDC_BODY_LEGLEFT 6025
#define IDC_BODY_LEGRIGHT 6030
#define IDC_BODY_ARMLEFT_T 6035
#define IDC_BODY_ARMRIGHT_T 6040
#define IDC_BODY_LEGLEFT_T 6045
#define IDC_BODY_LEGRIGHT_T 6050
#define IDC_BODY_ARMLEFT_B 6055
#define IDC_BODY_ARMRIGHT_B 6060
#define IDC_BODY_LEGLEFT_B 6065
#define IDC_BODY_LEGRIGHT_B 6070

#define IDC_TRIAGE_STATUS 7000
#define IDC_TRIAGE_SELECT 7100
Loading

0 comments on commit dc680d6

Please sign in to comment.