From cb8945a879986095b1ff3aa9910773f6d90392b0 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 18 Jan 2015 08:20:55 +0100 Subject: [PATCH] port markers --- TO_MERGE/agm/Markers/config.cpp | 47 ------------------- addons/markers/$PBOPREFIX$ | 1 + addons/markers/CfgEventHandlers.hpp | 12 +++++ .../markers}/InsertMarker.hpp | 11 +++++ .../markers/XEH_postInit.sqf | 0 addons/markers/XEH_preInit.sqf | 11 +++++ addons/markers/config.cpp | 16 +++++++ .../functions/fn_onLBSelChangedColor.sqf | 0 .../functions/fn_onLBSelChangedShape.sqf | 0 .../functions/fn_onSliderPosChangedAngle.sqf | 0 .../markers}/functions/fn_sendMarkersJIP.sqf | 0 .../markers}/functions/fn_setMarker.sqf | 0 .../markers}/functions/fn_setMarkerJIP.sqf | 0 .../functions/fn_setMarkerNetwork.sqf | 0 .../markers/functions}/initInsertMarker.sqf | 0 .../markers/functions}/placeMarker.sqf | 0 addons/markers/script_component.hpp | 12 +++++ .../markers}/stringtable.xml | 6 +-- 18 files changed, 66 insertions(+), 50 deletions(-) delete mode 100644 TO_MERGE/agm/Markers/config.cpp create mode 100644 addons/markers/$PBOPREFIX$ create mode 100644 addons/markers/CfgEventHandlers.hpp rename {TO_MERGE/agm/Markers => addons/markers}/InsertMarker.hpp (97%) rename TO_MERGE/agm/Markers/clientInit.sqf => addons/markers/XEH_postInit.sqf (100%) create mode 100644 addons/markers/XEH_preInit.sqf create mode 100644 addons/markers/config.cpp rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_onLBSelChangedColor.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_onLBSelChangedShape.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_onSliderPosChangedAngle.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_sendMarkersJIP.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_setMarker.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_setMarkerJIP.sqf (100%) rename {TO_MERGE/agm/Markers => addons/markers}/functions/fn_setMarkerNetwork.sqf (100%) rename {TO_MERGE/agm/Markers/scripts => addons/markers/functions}/initInsertMarker.sqf (100%) rename {TO_MERGE/agm/Markers/scripts => addons/markers/functions}/placeMarker.sqf (100%) create mode 100644 addons/markers/script_component.hpp rename {TO_MERGE/agm/Markers => addons/markers}/stringtable.xml (84%) diff --git a/TO_MERGE/agm/Markers/config.cpp b/TO_MERGE/agm/Markers/config.cpp deleted file mode 100644 index 3811f1f685..0000000000 --- a/TO_MERGE/agm/Markers/config.cpp +++ /dev/null @@ -1,47 +0,0 @@ -class CfgPatches { - class AGM_Markers { - units[] = {}; - weapons[] = {}; - requiredVersion = 0.60; - requiredAddons[] = {AGM_Core}; - version = "0.95"; - versionStr = "0.95"; - versionAr[] = {0,95,0}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; - }; -}; - -class CfgFunctions { - class AGM_Markers { - class AGM_Markers { - file = "AGM_Markers\functions"; - class onLBSelChangedColor; - class onLBSelChangedShape; - class onSliderPosChangedAngle; - class sendMarkersJIP; - class setMarker; - class setMarkerJIP; - class setMarkerNetwork; - }; - }; -}; - -class Extended_PostInit_EventHandlers { - class AGM_Markers { - clientInit = "call compile preprocessFileLineNumbers 'AGM_Markers\clientInit.sqf'"; - }; -}; - -class RscPicture; -class RscText; -class RscStructuredText; -class RscButtonMenuOK; -class RscButtonMenuCancel; -class RscButtonMenu; -class RscEdit; -class RscCombo; -class RscSlider; -class RscXSliderH; - -#include diff --git a/addons/markers/$PBOPREFIX$ b/addons/markers/$PBOPREFIX$ new file mode 100644 index 0000000000..c385330d39 --- /dev/null +++ b/addons/markers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\markers \ No newline at end of file diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp new file mode 100644 index 0000000000..0cd959a047 --- /dev/null +++ b/addons/markers/CfgEventHandlers.hpp @@ -0,0 +1,12 @@ + +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)); + }; +}; diff --git a/TO_MERGE/agm/Markers/InsertMarker.hpp b/addons/markers/InsertMarker.hpp similarity index 97% rename from TO_MERGE/agm/Markers/InsertMarker.hpp rename to addons/markers/InsertMarker.hpp index 07366a1f4b..3fcf4d8344 100644 --- a/TO_MERGE/agm/Markers/InsertMarker.hpp +++ b/addons/markers/InsertMarker.hpp @@ -1,4 +1,15 @@ +class RscPicture; +class RscText; +class RscStructuredText; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenu; +class RscEdit; +class RscCombo; +class RscSlider; +class RscXSliderH; + class RscDisplayInsertMarker { onLoad = "_this call compile preprocessFileLineNumbers 'AGM_Markers\scripts\initInsertMarker.sqf'"; onUnload = "_this call compile preprocessFileLineNumbers 'AGM_Markers\scripts\placeMarker.sqf'"; diff --git a/TO_MERGE/agm/Markers/clientInit.sqf b/addons/markers/XEH_postInit.sqf similarity index 100% rename from TO_MERGE/agm/Markers/clientInit.sqf rename to addons/markers/XEH_postInit.sqf diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf new file mode 100644 index 0000000000..b2304b22c4 --- /dev/null +++ b/addons/markers/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +PREP(initInsertMarker); +PREP(onLBSelChangedColor); +PREP(onLBSelChangedShape); +PREP(onSliderPosChangedAngle); +PREP(placeMarker); +PREP(sendMarkersJIP); +PREP(setMarker); +PREP(setMarkerJIP); +PREP(setMarkerNetwork); diff --git a/addons/markers/config.cpp b/addons/markers/config.cpp new file mode 100644 index 0000000000..24d3c778d8 --- /dev/null +++ b/addons/markers/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2/"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "InsertMarker.hpp" diff --git a/TO_MERGE/agm/Markers/functions/fn_onLBSelChangedColor.sqf b/addons/markers/functions/fn_onLBSelChangedColor.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_onLBSelChangedColor.sqf rename to addons/markers/functions/fn_onLBSelChangedColor.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_onLBSelChangedShape.sqf b/addons/markers/functions/fn_onLBSelChangedShape.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_onLBSelChangedShape.sqf rename to addons/markers/functions/fn_onLBSelChangedShape.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_onSliderPosChangedAngle.sqf b/addons/markers/functions/fn_onSliderPosChangedAngle.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_onSliderPosChangedAngle.sqf rename to addons/markers/functions/fn_onSliderPosChangedAngle.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_sendMarkersJIP.sqf b/addons/markers/functions/fn_sendMarkersJIP.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_sendMarkersJIP.sqf rename to addons/markers/functions/fn_sendMarkersJIP.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_setMarker.sqf b/addons/markers/functions/fn_setMarker.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_setMarker.sqf rename to addons/markers/functions/fn_setMarker.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_setMarkerJIP.sqf b/addons/markers/functions/fn_setMarkerJIP.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_setMarkerJIP.sqf rename to addons/markers/functions/fn_setMarkerJIP.sqf diff --git a/TO_MERGE/agm/Markers/functions/fn_setMarkerNetwork.sqf b/addons/markers/functions/fn_setMarkerNetwork.sqf similarity index 100% rename from TO_MERGE/agm/Markers/functions/fn_setMarkerNetwork.sqf rename to addons/markers/functions/fn_setMarkerNetwork.sqf diff --git a/TO_MERGE/agm/Markers/scripts/initInsertMarker.sqf b/addons/markers/functions/initInsertMarker.sqf similarity index 100% rename from TO_MERGE/agm/Markers/scripts/initInsertMarker.sqf rename to addons/markers/functions/initInsertMarker.sqf diff --git a/TO_MERGE/agm/Markers/scripts/placeMarker.sqf b/addons/markers/functions/placeMarker.sqf similarity index 100% rename from TO_MERGE/agm/Markers/scripts/placeMarker.sqf rename to addons/markers/functions/placeMarker.sqf diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp new file mode 100644 index 0000000000..2b1cb586a7 --- /dev/null +++ b/addons/markers/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT markers +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MARKERS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_MARKERS + #define DEBUG_SETTINGS DEBUG_ENABLED_MARKERS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/TO_MERGE/agm/Markers/stringtable.xml b/addons/markers/stringtable.xml similarity index 84% rename from TO_MERGE/agm/Markers/stringtable.xml rename to addons/markers/stringtable.xml index e324341854..0d2619ae40 100644 --- a/TO_MERGE/agm/Markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,8 +1,8 @@  - + - + Direction: %1° Drehung: %1° Direction: %1° @@ -11,7 +11,7 @@ Dirección: %1° Направление: %1 - + Place in: %1 Platz in: %1 Colocar en: %1