Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full APP-6D support #88

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
texHeaders.bin
/.vs
.vs
*.pbo
/cTabIRL/.vs
/cTabIRL/cTabExtension/bin
Expand All @@ -24,3 +24,9 @@ appsettings.Development.json
/cTabIRL/@cTabIRL/.hemttout
/@cTab/.hemttout
/@cTab/.hemtt/missions/~basic.vr
/generators/App6dGenerator/bin
/generators/App6dGenerator/obj
/@cTab/addons/app6d/data/*/*/*.png
/@cTab/addons/app6d/data/*/*.png
/generators/LineFontsGenerator/obj
/generators/LineFontsGenerator/bin
1 change: 1 addition & 0 deletions @cTab/addons/app6d/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\ctab\addons\app6d
15 changes: 15 additions & 0 deletions @cTab/addons/app6d/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
8 changes: 8 additions & 0 deletions @cTab/addons/app6d/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PREP(getSidcImages);
PREP(getSidcImagesCached);
PREP(drawMilsymbol);
PREP(initInsertMarker);
PREP(placeMarker);
PREP(updateEditorSidc);
PREP(updatePreviewOptions);
PREP(updateEditorSelects);
44 changes: 44 additions & 0 deletions @cTab/addons/app6d/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include "script_component.hpp"

plop = [];//["common identifier", "higher formation", "unique designation", 1, "date time group"];

// Only for tests
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["draw", {
params ["_ctrl"];
{
private _sidc = markerText _x;
if ( count _idc == 0 ) then { _sidc = DEFAULT_SIDC; };
[_ctrl, _sidc, markerPos _x, _y, BASELINE_ICON_SIZE * ((markerSize _x) # 0), markerAlpha _x] call FUNC(drawMilsymbol);
} forEach GVAR(makers);
}];

addMissionEventHandler ["MarkerCreated", {
params ['_name'];
if ( markerType _name == "ctab_app6d_generic") then {
GVAR(makers) getOrDefault [_name, [], true];
[{
params ['_name'];
private _sidc = markerText _name;
if ( _sidc == "" ) then {
_name setMarkerTextLocal "10031000131211050051";
};
_name setMarkerColorLocal "Transparent";
}, [_name]] call CBA_fnc_execNextFrame;
};
}];

addMissionEventHandler ["MarkerDeleted", {
params ['_name'];
if ( markerType _name == "ctab_app6d_generic") then {
GVAR(makers) deleteAt _name;
};
}];

["ace_markers_markerPlaced", {
params ["_name"];
// Marker is not yet created, look at ACE config informations
if (ace_markers_currentMarkerConfigName == "ctab_app6d_generic") then {
ace_markers_currentMarkerColorConfigName = "Transparent";
GVAR(makers) set [_name, GVAR(editingOptions)];
};
}] call CBA_fnc_addEventHandler;
7 changes: 7 additions & 0 deletions @cTab/addons/app6d/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
ADDON = true;
GVAR(cache) = createHashMap;
GVAR(reinforcedReducedIcons) = ["", QPATHTOF(data\o\plus_ca.paa), QPATHTOF(data\o\minus_ca.paa), QPATHTOF(data\o\plusminus_ca.paa)];
GVAR(makers) = createHashMap;
2 changes: 2 additions & 0 deletions @cTab/addons/app6d/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
4 changes: 4 additions & 0 deletions @cTab/addons/app6d/addon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[files]
exclude = [
"data/**/*.png"
]
95 changes: 95 additions & 0 deletions @cTab/addons/app6d/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = QUOTE(COMPONENT);
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ctab_main", "ctab_core", "ace_markers"};
author = "GrueArbre";
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
class CfgMarkerColors
{
class Transparent
{
name="APP-6D Icon";
color[]={0, 0, 0, 0};
scope=0;
};
};
class CfgMarkers
{
class b_unknown;
class ctab_app6d_generic : b_unknown
{
scope=2;
author="GrueArbre";
name="APP-6D Icon";
icon="\A3\ui_f\data\map\Markers\System\dummy_ca.paa";
size=64;
showEditorMarkerColor = 0;
color[] = { 0, 0, 0, 0 };
};
};


class CfgFontFamilies
{
class TahomaBLineZero
{
fonts[]=
{
"z\ctab\addons\app6d\data\fonts\TahomaBLineZero8",
"z\ctab\addons\app6d\data\fonts\TahomaBLineZero16",
"z\ctab\addons\app6d\data\fonts\TahomaBLineZero32"
};
};
class TahomaBLineOne
{
fonts[]=
{
"z\ctab\addons\app6d\data\fonts\TahomaBLineOne8",
"z\ctab\addons\app6d\data\fonts\TahomaBLineOne16",
"z\ctab\addons\app6d\data\fonts\TahomaBLineOne32"
};
};
class TahomaBLineTwo
{
fonts[]=
{
"z\ctab\addons\app6d\data\fonts\TahomaBLineTwo8",
"z\ctab\addons\app6d\data\fonts\TahomaBLineTwo16",
"z\ctab\addons\app6d\data\fonts\TahomaBLineTwo32"
};
};
class TahomaBLineThree
{
fonts[]=
{
"z\ctab\addons\app6d\data\fonts\TahomaBLineThree8",
"z\ctab\addons\app6d\data\fonts\TahomaBLineThree16",
"z\ctab\addons\app6d\data\fonts\TahomaBLineThree32"
};
};
};

class RscDisplayInsertMarker {
onLoad = QUOTE(_this call FUNC(initInsertMarker));
onUnload = QUOTE(_this call FUNC(placeMarker));
};
class RscButton;
class GVAR(valueButton): RscButton {
colorText[] = {0, 0, 0, 0};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0};
colorShadow[] = {0, 0, 0, 0};
colorBorder[] = {0, 0, 0, 0};
colorBackgroundActive[] = {0, 0, 0, 0};
colorDisabled[] = {0, 0, 0, 0};
colorBackgroundDisabled[] = {0, 0, 0, 0};
};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading