Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: CI

on:
push:
branches:
- master
pull_request:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: |
hemtt check --pedantic
hemtt release
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT check
run: |
hemtt release
- name: Run HEMTT build
run: |
hemtt release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ texHeaders.bin
*.swp
*.swo
*.biprivatekey
.hemttprivatekey
Thumbs.db

node_modules
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/functions/fnc_despawn.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "script_component.hpp"
if !(isServer) exitWith {};
params [
["_group", [], ["", objNull, grpNull]],
["_group", [], ["", objNull, grpNull, []]],
["_id", "", [""]],
["_init", {}, [{}]],
["_params",[], [[]]]
Expand Down
3 changes: 1 addition & 2 deletions addons/assets/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ class CfgPatches {
class ADDON {
units[] = {
QGVAR(PortableBoat),
QGVAR(PortableBoatBackpack),
"FPA_scissors"
QGVAR(PortableBoatBackpack)
};
weapons[] = {"FPA_scissors"};
requiredVersion = REQUIRED_VERSION;
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_onZeusInterface.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

#include "script_component.hpp"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
#include "\A3\Ui_f\hpp\defineDIKCodes.inc"
#include "\A3\ui_f_curator\ui\defineResinclDesign.inc"

#define IDD_CTRL_ACRE 777550
Expand Down
1 change: 1 addition & 0 deletions addons/medical/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class CfgPatches {
requiredAddons[] = {"fpa_main", "ace_medical_treatment", "ace_zeus"};
author = "diwako";
authorUrl = "";
VERSION_CONFIG;
};
};

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions addons/steamevents/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\fpa\addons\steamevents
5 changes: 5 additions & 0 deletions addons/steamevents/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postClientInit));
};
};
41 changes: 41 additions & 0 deletions addons/steamevents/SteamManagerConfig.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class SteamManagerConfig {
class GameRecording {
class GVAR(uncon) {
scope = 2; // Can be modded to 1 or 0 to disable the event. Must be 2 to be visible
title = "Uncon Event";
description = "%1 at %2"; // Format string, arguments are passed by eventArguments
icon = "a3_revive"; // Icon is enum, there is hardcoded set of available icons
priority = 40; // See ISteamTimeline documentation
};
class GVAR(missionEnd): GVAR(uncon) {
title = "Mission End";
description = "End of mission (%1)";
icon = "a3_challenge_timer";
};
class GVAR(aceThrow): GVAR(uncon) {
title = "Grenade Thrown";
description = "%1 thrown";
icon = "a3_grenade_throw";
priority = 20;
};
class GVAR(vehicle): GVAR(uncon) {
title = "Vehicle";
description = "Got %1 %2";
icon = "a3_vehicle_driver";
priority = 20;
};

class GVAR(mission): GVAR(uncon) {
title = "Mission";
description = "%1";
icon = "a3_steam_info";
};

class UnitKilled {
scope = 0; // hide vanilla event
};
class GVAR(UnitKilled): UnitKilled {
scope = 2;
};
};
};
56 changes: 56 additions & 0 deletions addons/steamevents/XEH_postClientInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include "script_component.hpp"

if (!hasInterface || profileNamespace getVariable [QGVAR(disable), false]) exitWith {};

GVAR(delayedEvents) = [];
DFUNC(addDelayedEvents) = {
{
_x params ["_time", "_event", "_params"];
private _relativeTime = _time - diag_tickTime; // negative time
steamGameRecordingEvent [_event, 0, _params, _relativeTime];
} forEach GVAR(delayedEvents);
GVAR(delayedEvents) = [];
INFO("Added Steam Events");
};
addMissionEventHandler ["Ended", {
params ["_endType"];
steamGameRecordingEvent [QGVAR(missionEnd), 0, [[CBA_missionTime] call CBA_fnc_formatElapsedTime]];
[] call FUNC(addDelayedEvents)
}];

["ace_unconscious", {
params ["_unit", "_uncon"];
if (_unit != ACE_player) exitWith {};
if (_uncon) then {
steamGameRecordingEvent [QGVAR(uncon), 0, ["Knocked unconcious", [CBA_missionTime, "M:SS"] call CBA_fnc_formatElapsedTime]];
} else {
steamGameRecordingEvent [QGVAR(uncon), 0, ["Woke up", [CBA_missionTime, "M:SS"] call CBA_fnc_formatElapsedTime]];
};
}] call CBA_fnc_addEventHandler;

["ace_throwableThrown", {
params ["_unit", "_activeThrowable"];
if (_unit != ACE_player) exitWith {}; // this should always be false
switch (true) do {
case (_activeThrowable isKindOf "ACE_G_Handflare_White"): {steamGameRecordingEvent [QGVAR(aceThrow), 0, ["Hand flare"]];};
case (_activeThrowable isKindOf "SmokeShell"): {steamGameRecordingEvent [QGVAR(aceThrow), 0, ["Smoke grenade"]];};
case (_activeThrowable isKindOf "ACE_SatchelCharge_Remote_Ammo_Thrown"): {steamGameRecordingEvent [QGVAR(aceThrow), 0, ["Explosive charge"]];};
default {steamGameRecordingEvent [QGVAR(aceThrow), 0, ["Hand grenade"]];};
};
}] call CBA_fnc_addEventHandler;

["ace_killtracker_kill", {
params ["_name", "", "_unit"];
private _distance = ace_player distance _unit;
GVAR(delayedEvents) pushBack [diag_tickTime, QGVAR(UnitKilled), [_name, _distance toFixed 0]];
}] call CBA_fnc_addEventHandler;

["vehicle", {
params ["_unit", "_vehicle", "_oldVehicle"];
if (_unit != ACE_player) exitWith {}; // kind of redundant aint it?
if (_unit isEqualTo _vehicle) then {
steamGameRecordingEvent [QGVAR(vehicle), 0, ["out of", getText (configOf _oldVehicle >> "displayName")]];
} else {
steamGameRecordingEvent [QGVAR(vehicle), 0, ["into", getText (configOf _vehicle >> "displayName")]];
};
}] call CBA_fnc_addPlayerEventHandler;
17 changes: 17 additions & 0 deletions addons/steamevents/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = QUOTE(COMPONENT_NAME);
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"fpa_main"};
author = "diwako";
authorUrl = "";
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
#include "SteamManagerConfig.hpp"
9 changes: 9 additions & 0 deletions addons/steamevents/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define COMPONENT steamevents
#include "\z\fpa\addons\main\script_mod.hpp"

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS

#include "\z\fpa\addons\main\script_macros.hpp"
10 changes: 10 additions & 0 deletions include/A3/Ui_f/hpp/defineDIKCodes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@
#define DIK_F14 0x65 /* (NEC PC98) */
#define DIK_F15 0x66 /* (NEC PC98) */

#define DIK_F16 0x67
#define DIK_F17 0x68
#define DIK_F18 0x69
#define DIK_F19 0x6A
#define DIK_F20 0x6B
#define DIK_F21 0x6C
#define DIK_F22 0x6D
#define DIK_F23 0x6E
#define DIK_F24 0x76

#define DIK_KANA 0x70 /* (Japanese keyboard) */
#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */
#define DIK_CONVERT 0x79 /* (Japanese keyboard) */
Expand Down
17 changes: 13 additions & 4 deletions include/A3/Ui_f/hpp/defineResincl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ enum
#define CT_ITEMSLOT 103
#define CT_CHECKBOX 77
#define CT_VEHICLE_DIRECTION 105
#define CT_WEBBROWSER 106
#define CT_EXTENSION 107

// Static styles
#define ST_POS 0x0F
Expand Down Expand Up @@ -408,6 +410,8 @@ enum
#define IDC_RESTART 5
#define IDC_USER_BUTTON 6
#define IDC_EXIT_TO_MAIN 7
#define IDC_EXIT_QUIT 8
#define IDC_USER_BUTTON2 9

// my own control window for tests
#define IDC_MY_FIRST_LISTBOX 110
Expand Down Expand Up @@ -1022,6 +1026,9 @@ enum
#define IDC_MAIN_QUICKPLAY 154
#define IDC_MAIN_UNIT 155

#define IDC_MAIN_INFO_BRANCH 156
#define IDC_MAIN_BRANCH_NAME 160

#define IDC_MAIN_CARDAS_CUDL 199 // muj vlastni cudl

#define IDC_MAIN_VIDEOCONTROL 3335
Expand Down Expand Up @@ -1378,6 +1385,7 @@ enum
#define IDC_OPTIONS_PP_DOF_SLIDER 1317
#define IDC_OPTIONS_PP_DOF_VALUE 1318
#define IDC_OPTIONS_PP_CAUSTICS 1319
#define IDC_OPTIONS_PP_HAZE 1329
#define IDC_OPTIONS_PP_SHARPEN_SLIDER 1320
#define IDC_OPTIONS_PP_SHARPEN_VALUE 1321
#define IDC_OPTIONS_PP_COLOR_CORRECTIONS 1322
Expand Down Expand Up @@ -1413,6 +1421,7 @@ enum
#define IDC_OPTIONS_WIND_INFLUENCE_DYN_RTD 149
#define IDC_OPTIONS_AUTO_TRIM_RTD 150
#define IDC_OPTIONS_STRESS_DAMAGE_RTD 151
#define IDC_OPTIONS_WEBBROWSER 152

#define IDC_PARTICLES_EFFECTS 143
#define IDC_OPTIONS_DYNAMIC_LIGHTS 144
Expand Down Expand Up @@ -1673,8 +1682,8 @@ enum
#define IDC_MULTI_FULL_FILTER 151
#define IDC_MULTI_TYPE_FILTER 152
#define IDC_MP_NEXT_SESSION 153
#define IDC_MULTI_BATTLEYE_FILTER 154
#define IDC_MULTI_EXPANSIONS_FILTER 155


#define IDC_MULTI_FAVORITE_COLUMN 156
#define IDC_MULTI_FAVORITE_ICON 157
#define IDC_MULTI_SERVER_COUNT 158
Expand All @@ -1696,7 +1705,7 @@ enum
#define IDC_MP_QUICK_BEST_SERVER 112
#define IDC_MP_QUICK_FIND_SERVER 113
#define IDC_MP_QUICK_SHOW_SERVERS 114
#define IDC_MP_QUICK_SHOW_SERVERS 114

#define IDC_MP_QUICK_MODE_TITLE 115
#define IDC_MP_QUICK_MODE_PICTURE 116
#define IDC_MP_QUICK_MODE_DESCRIPTION 117
Expand Down Expand Up @@ -3133,7 +3142,7 @@ enum


//A3 credits
#define ONBUTTONCLICK_START_CREDITS "0 = _this spawn (uiNamespace getVariable 'bis_fnc_credits');"
#define ONBUTTONCLICK_START_CREDITS "0 = _this spawn (uinamespace getvariable 'bis_fnc_credits');"


// Hitzone types
Expand Down
32 changes: 27 additions & 5 deletions include/x/cba/addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ Macros: TRACE_n()
Author:
Spooner
------------------------------------------- */
#define PFORMAT_1(MESSAGE,A) \
format ['%1: A=%2', MESSAGE, RETNIL(A)]
#define PFORMAT_1(MESSAGE,A) format ['%1: A=%2', MESSAGE, RETNIL(A)]

#define PFORMAT_2(MESSAGE,A,B) \
format ['%1: A=%2, B=%3', MESSAGE, RETNIL(A), RETNIL(B)]
Expand Down Expand Up @@ -965,8 +964,8 @@ Macro: PREP()
//#define PREP(var1) PREP_SYS(PREFIX,COMPONENT_F,var1)

#ifdef DISABLE_COMPILE_CACHE
#define PREP(var1) TRIPLES(ADDON,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))'
#define PREPMAIN(var1) TRIPLES(PREFIX,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))'
#define PREP(var1) TRIPLES(ADDON,fnc,var1) = compile preprocessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))'
#define PREPMAIN(var1) TRIPLES(PREFIX,fnc,var1) = compile preprocessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))'
#else
#define PREP(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(ADDON,fnc,var1)'] call SLX_XEH_COMPILE_NEW
#define PREPMAIN(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(PREFIX,fnc,var1)'] call SLX_XEH_COMPILE_NEW
Expand Down Expand Up @@ -1335,7 +1334,7 @@ Macros: PARAMS_n()

/* -------------------------------------------
Macro: DEFAULT_PARAM()
DEPRECATED - Use param/params commands added in Arma 3 1.48
DEPRECATED - Use param/params commands added in Arma 3 1.48 - Will not work with HEMTT 1.13.2+

Getting a default function parameter. This may be used together with <PARAMS_n()> to have a mix of required and
optional parameters.
Expand Down Expand Up @@ -1833,3 +1832,26 @@ Macro: FILE_EXISTS
commy2
------------------------------------------- */
#define FILE_EXISTS(FILE) (fileExists (FILE))

/* -------------------------------------------
Macro: QADDON, QQADDON

Description:
Quoted Variant of ADDON

Parameters:

Examples:
(begin example)
QUOTE(configName _x isEqualTo QUOTE(QUOTE(abe_banana))) configClasses (configFile >> QADDON)
(end)

Author:
OverlordZorn
------------------------------------------- */
#ifndef QADDON
#define QADDON QUOTE(ADDON)
#endif
#ifndef QQADDON
#define QQADDON QUOTE(QUOTE(ADDON))
#endif