diff --git a/addons/map/CfgEventHandlers.hpp b/addons/map/CfgEventHandlers.hpp index 23d60e02da..49b87fb4fd 100644 --- a/addons/map/CfgEventHandlers.hpp +++ b/addons/map/CfgEventHandlers.hpp @@ -1,12 +1,11 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); - serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) ); - }; + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit) ); + }; }; class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) ); - }; + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) ); + }; }; diff --git a/addons/map/CfgMarkers.hpp b/addons/map/CfgMarkers.hpp index d6281a4a6e..0a04e4a691 100644 --- a/addons/map/CfgMarkers.hpp +++ b/addons/map/CfgMarkers.hpp @@ -1,67 +1,42 @@ // MARKERS class CfgMarkers { - class Flag; + class Flag; - // Reenable NATO symbols ... - class b_unknown: Flag {scope = 2;}; + // Reenable NATO symbols ... + class b_unknown: Flag {scope = 2;}; - // ... and disable all the useless ones - // If you think that some of these are needed, create an issue; But until - // there's a better way to place markers, there should be only the most - // important markers here. - // Keep in mind that all of these can still be placed in the editor. - class b_hq: b_unknown {scope = 1;}; - class b_installation: b_unknown {scope = 1;}; - class b_maint: b_unknown {scope = 1;}; - class b_med: b_unknown {scope = 1;}; - class b_service: b_unknown {scope = 1;}; - class b_support: b_unknown {scope = 1;}; + // ... and disable all the useless ones + // If you think that some of these are needed, create an issue; But until + // there's a better way to place markers, there should be only the most + // important markers here. + // Keep in mind that all of these can still be placed in the editor. + class b_hq: b_unknown {scope = 1;}; + class b_installation: b_unknown {scope = 1;}; + class b_maint: b_unknown {scope = 1;}; + class b_med: b_unknown {scope = 1;}; + class b_service: b_unknown {scope = 1;}; + class b_support: b_unknown {scope = 1;}; - class n_unknown: b_unknown {}; - class n_hq: n_unknown {scope = 1;}; - class n_installation: n_unknown {scope = 1;}; - class u_installation: n_unknown {scope = 1;}; // i have no idea... - class n_maint: n_unknown {scope = 1;}; - class n_med: n_unknown {scope = 1;}; - class n_service: n_unknown {scope = 1;}; - class n_support: n_unknown {scope = 1;}; + class n_unknown: b_unknown {}; + class n_hq: n_unknown {scope = 1;}; + class n_installation: n_unknown {scope = 1;}; + class u_installation: n_unknown {scope = 1;}; // i have no idea... + class n_maint: n_unknown {scope = 1;}; + class n_med: n_unknown {scope = 1;}; + class n_service: n_unknown {scope = 1;}; + class n_support: n_unknown {scope = 1;}; - class o_unknown: b_unknown {}; - class o_hq: o_unknown {scope = 1;}; - class o_installation: o_unknown {scope = 1;}; - class o_maint: o_unknown {scope = 1;}; - class o_med: o_unknown {scope = 1;}; - class o_service: o_unknown {scope = 1;}; - class o_support: o_unknown {scope = 1;}; + class o_unknown: b_unknown {}; + class o_hq: o_unknown {scope = 1;}; + class o_installation: o_unknown {scope = 1;}; + class o_maint: o_unknown {scope = 1;}; + class o_med: o_unknown {scope = 1;}; + class o_service: o_unknown {scope = 1;}; + class o_support: o_unknown {scope = 1;}; - // disable all civy markers (harbor etc.) - class c_unknown: b_unknown {scope = 1;}; + // disable all civy markers (harbor etc.) + class c_unknown: b_unknown {scope = 1;}; - // disable quantity indicators (fire team/squad/platoon ...) - class group_0: b_unknown {scope = 1;}; - - - class ACE_MapToolFixed { - name = "MapToolFixed"; - icon = PATHTOF(data\mapToolFixed.paa); - scope = 0; - color[] = {1,1,1,1}; - size = 32; - }; - - class ACE_MapToolRotatingNormal { - name = "MapToolRotating"; - icon = PATHTOF(data\mapToolRotatingNormal.paa); - scope = 0; - color[] = {1,1,1,1}; - size = 32; - }; - - class ACE_MapToolRotatingSmall { - name = "MapToolRotating"; - icon = PATHTOF(data\mapToolRotatingSmall.paa); - scope = 0; - color[] = {1,1,1,1}; - size = 32; - }; + // disable quantity indicators (fire team/squad/platoon ...) + class group_0: b_unknown {scope = 1;}; }; diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 4452c10b23..6b68864728 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -1,160 +1,28 @@ -#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ - name = #ITEM; \ - count = COUNT; \ - }; - class CfgVehicles { - class Man; - class CAManBase: Man { - class ACE_SelfActions { - - class ACE_MapTools { - displayName = "$STR_ACE_Map_MapTools_Menu"; - condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)})); - statement = ""; - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 0; - priority = 100; - enableInside = 1; - - class ACE_MapToolsHide { - displayName = "$STR_ACE_Map_MapToolsHide"; - condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); - statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 1; - priority = 5; - enableInside = 1; + class Module_F; + class ACE_ModuleBlueForceTracking: Module_F { + author = "$STR_ACE_Common_ACETeam"; + category = "ACE"; + displayName = "Blue Force Tracking"; + function = QFUNC(blueForceTrackingModule); + scope = 2; + isGlobal = 1; + icon = PATHTOF(UI\IconBFTracking_ca.paa); + class Arguments { + class Interval { + displayName = "Interval"; + description = "How often the markers should be refreshed (in seconds)"; + defaultValue = 1; + }; + class HideAiGroups { + displayName = "Hide AI groups?"; + description = "Hide markers for 'AI only' groups?"; + typeName = "BOOL"; + class values { + class Yes { name = "Yes"; value = 1; }; + class No { name = "No"; value = 0; default = 1; }; + }; + }; }; - class ACE_MapToolsShowNormal { - displayName = "$STR_ACE_Map_MapToolsShowNormal"; - condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1})); - statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 1; - priority = 4; - enableInside = 1; - }; - class ACE_MapToolsShowSmall { - displayName = "$STR_ACE_Map_MapToolsShowSmall"; - condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2})); - statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 1; - priority = 3; - enableInside = 1; - }; - class ACE_MapToolsAlignNorth { - displayName = "$STR_ACE_Map_MapToolsAlignNorth"; - condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); - statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 1; - priority = 2; - enableInside = 1; - }; - class ACE_MapToolsAlignCompass { - displayName = "$STR_ACE_Map_MapToolsAlignCompass"; - condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}})); - statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 1; - priority = 1; - enableInside = 1; - }; - class ACE_MapGpsShow { - displayName = "$STR_ACE_Map_MapGpsShow"; - condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)})); - statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 0; - priority = 0; - enableInside = 1; - }; - class ACE_MapGpsHide { - displayName = "$STR_ACE_Map_MapGpsHide"; - condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)})); - statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; - showDisabled = 0; - priority = 0; - enableInside = 1; - }; - }; }; - - class ACE_Actions { - class ACE_MainActions { - class ACE_CopyMap { - displayName = "$STR_ACE_Map_CopyMap"; - condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target})); - statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart)); - showDisabled = 0; - priority = -1; - }; - }; - }; - }; - - class NATO_Box_Base; - class EAST_Box_Base; - class IND_Box_Base; - class FIA_Box_Base_F; - - class Box_NATO_Support_F: NATO_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_MapTools,12) - }; - }; - - class Box_East_Support_F: EAST_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_MapTools,12) - }; - }; - - class Box_IND_Support_F: IND_Box_Base { - class TransportItems { - MACRO_ADDITEM(ACE_MapTools,12) - }; - }; - - class Box_FIA_Support_F: FIA_Box_Base_F { - class TransportItems { - MACRO_ADDITEM(ACE_MapTools,12) - }; - }; - - class ACE_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(ACE_MapTools,12) - }; - }; - - class Module_F; - class ACE_ModuleBlueForceTracking: Module_F { - author = "$STR_ACE_Common_ACETeam"; - category = "ACE"; - displayName = "Blue Force Tracking"; - function = QFUNC(blueForceTrackingModule); - scope = 2; - isGlobal = 1; - icon = PATHTOF(UI\IconBFTracking_ca.paa); - class Arguments { - class Interval { - displayName = "Interval"; - description = "How often the markers should be refreshed (in seconds)"; - defaultValue = 1; - }; - class HideAiGroups { - displayName = "Hide AI groups?"; - description = "Hide markers for 'AI only' groups?"; - typeName = "BOOL"; - class values { - class Yes { name = "Yes"; value = 1; }; - class No { name = "No"; value = 0; default = 1; }; - }; - }; - }; - }; }; diff --git a/addons/map/CfgWeapons.hpp b/addons/map/CfgWeapons.hpp deleted file mode 100644 index fa6d0897c5..0000000000 --- a/addons/map/CfgWeapons.hpp +++ /dev/null @@ -1,15 +0,0 @@ -class CfgWeapons { - class ACE_ItemCore; - class InventoryItem_Base_F; - - class ACE_MapTools: ACE_ItemCore { - displayName = "$STR_ACE_MapTools_Name"; - descriptionShort = "$STR_ACE_MapTools_Description"; - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - picture = PATHTOF(UI\maptool_item.paa); - scope = 2; - class ItemInfo: InventoryItem_Base_F { - mass = 1; - }; - }; -}; diff --git a/addons/map/MapControls.hpp b/addons/map/MapControls.hpp index 3255cb7929..62256e2df4 100644 --- a/addons/map/MapControls.hpp +++ b/addons/map/MapControls.hpp @@ -1,93 +1,9 @@ class controls { - class ButtonPlayer: RscActiveText { - text = ""; - w = 0; - h = 0; - sizeEx = 0; - onButtonClick = ""; - }; - class CA_PlayerName: RscText { - x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class ProfilePicture: RscPicture { - x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class ProfileBackground: RscText { - x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class Separator1: RscPicture { - x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class ColorBlack: RscButton { - idc = 36732; - x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.2,0.2,0.2,1}; - colorBackgroundActive[] = {0,0,0,1}; - colorFocused[] = {0,0,0,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]); - }; - class ColorRed: RscButton { - idc = 36733; - x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.8,0.2,0.2,1}; - colorBackgroundActive[] = {1,0,0,1}; - colorFocused[] = {1,0,0,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]); - }; - class ColorGreen: RscButton { - idc = 36734; - x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.2,0.8,0.2,1}; - colorBackgroundActive[] = {0,1,0,1}; - colorFocused[] = {0,1,0,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]); - }; - class ColorBlue: RscButton { - idc = 36735; - x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.2,0.2,0.8,1}; - colorBackgroundActive[] = {0,0,1,1}; - colorFocused[] = {0,0,1,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]); - }; - class ColorYellow: RscButton { - idc = 36736; - x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.8,0.8,0.2,1}; - colorBackgroundActive[] = {1,1,0,1}; - colorFocused[] = {1,1,0,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]); - }; - class ColorWhite: RscButton { - idc = 36737; - x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0.8,0.8,0.8,1}; - colorBackgroundActive[] = {1,1,1,1}; - colorFocused[] = {1,1,1,1}; - onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]"; - // onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]); - }; + class ButtonPlayer: RscActiveText { + text = ""; + w = 0; + h = 0; + sizeEx = 0; + onButtonClick = ""; + }; }; diff --git a/addons/map/MapGpsUI.hpp b/addons/map/MapGpsUI.hpp deleted file mode 100644 index e21b8db0a1..0000000000 --- a/addons/map/MapGpsUI.hpp +++ /dev/null @@ -1,81 +0,0 @@ -#define GUI_GRID_X (0) -#define GUI_GRID_Y (0) -#define GUI_GRID_W (0.025) -#define GUI_GRID_H (0.04) - -#define ST_LEFT 0x00 -#define ST_RIGHT 0x01 -#define ST_CENTER 0x02 - -#define W_gps 0.4025 -#define H_gps 0.25 -#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps -#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps - -class RscTitles { - class RscACE_MapGps { - idd = 9855; - movingEnable = 1; - duration = 3600; - fadein = 0; - fadeout = 0; - // onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];); - onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this - //onUnLoad = "_this call onRscLoad"; - class controls { - class back:RscPicture { - x = X_gps; - y = Y_gps; - w = W_gps; - h = H_gps; - text = PATHTOF(UI\mapGps.paa); - colorBackground[] = {1, 1, 1, 1}; - }; - class heading: RscText{ - idc = 913590; - x = X_gps + W_gps * 0.25; - y = Y_gps + H_gps * 0.12; - w = W_gps * 0.2; - h = H_gps * 0.16; - style = ST_LEFT; - text = "225"; - colorBackground[] = {0,0,0,0}; - colorText[] = {0.247,0.251,0.157,1}; - shadowColo[] = {0,0,0,0}; - font = "EtelkaNarrowMediumPro"; - shadow = 0; - sizeEx = 0.042; - }; - class altitude: RscText{ - idc = 913591; - x = X_gps + W_gps * 0.55; - y = Y_gps + H_gps * 0.12; - w = W_gps * 0.2; - h = H_gps * 0.16; - style = ST_RIGHT; - text = "55 m"; - colorBackground[] = {0,0,0,0}; - colorText[] = {0.247,0.251,0.157,1}; - shadowColo[] = {0,0,0,0}; - font = "EtelkaNarrowMediumPro"; - shadow = 0; - sizeEx = 0.042; - }; - class coordinates: RscText{ - idc = 913592; - x = X_gps + W_gps * 0.2; - y = Y_gps + H_gps * 0.33; - w = W_gps * 0.6; - h = H_gps * 0.35; - style = ST_CENTER; - text = "012.3 115.1"; - colorBackground[] = {0,0,0,0}; - colorText[] = {0.247,0.251,0.157,1}; - shadowColo[] = {0,0,0,0}; - font = "EtelkaNarrowMediumPro"; - shadow = 0; - sizeEx = 0.1; - }; - }; - }; -}; diff --git a/addons/map/README.md b/addons/map/README.md index e51efe71d5..6544d0f236 100644 --- a/addons/map/README.md +++ b/addons/map/README.md @@ -1,7 +1,12 @@ ace_map ======= -Various tweaks to the in-game map. +Various tweaks to the in-game map. Including: +- Better map styling (countours, legend, hiding bushes and trees, etc). +- Max zoom level (optional) +- Map shaking while walking (optional) +- Map illumination (optional) +- Blufor tracker (optional) ## Maintainers diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 24b906e61c..1155834f1c 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -1,71 +1,20 @@ -// by CAA-Picard - #include "script_component.hpp" -if (!hasInterface) exitWith{}; +ADDON = false; +LOG(MSG_INIT); -// Init variables -GVAR(mapVisableLastFrame) = false; -GVAR(mapGpsShow) = true; +// Calculate the maximum zoom allowed for this map +call FUNC(determineZoom); -GVAR(mapTool_Shown) = 0; -GVAR(mapTool_pos) = [0,0]; -GVAR(mapTool_angle) = 0; -GVAR(mapTool_isDragging) = false; -GVAR(mapTool_isRotating) = false; - -GVAR(drawing_isDrawing) = false; -GVAR(drawing_tempLineMarker) = []; -GVAR(drawing_lineMarkers) = []; -GVAR(drawing_drawColor) = "ColorBlack"; -GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737]; - -//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring breifing. [] spawn { - _fnc_installMapEvents = { - _d = _this; - diag_log format ["Installing EH in display %1", _d]; - ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}]; - ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}]; - ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}]; - ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}]; - (finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}]; - }; + // Wait until the map display is detected + waitUntil {(!isNull findDisplay 12)}; - // Wait until the briefing map is detected - // display = 37 for SP - // display = 52 for host server on MP; - // display = 53 for MP clients) - waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)}; + GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; + GVAR(lastStillTime) = time; + GVAR(isShaking) = false; - if (isNull findDisplay 12) then { - // Install event handlers on the map control of the briefing screen (control = 51) - GVAR(drawing_syncMarkers) = true; - if (!isNull findDisplay 52) then { - 52 call _fnc_installMapEvents; - } else { - if (!isNull findDisplay 53) then { - 53 call _fnc_installMapEvents; - } else { - 37 call _fnc_installMapEvents; - }; - }; - } else { - // Briefing screen was skipped; the player is JIP, create the markers defined during the briefing - GVAR(drawing_syncMarkers) = false; - { - _x call FUNC(addLineMarker); - } forEach GVAR(drawing_serverLineMarkers); - }; - - // Wait until the main map display is detected (display = 12) - waitUntil { !isNull findDisplay 12 }; - // Install event handlers on the map control and display (control = 51) - GVAR(drawing_syncMarkers) = false; - 12 call _fnc_installMapEvents; - - // Update the size and rotation of map tools - [] call FUNC(updateMapToolMarkers); - - [FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}]; }; + +ADDON = true; diff --git a/addons/map/XEH_preInit.sqf b/addons/map/XEH_preInit.sqf index 1ab43c7ca8..9bd60c865f 100644 --- a/addons/map/XEH_preInit.sqf +++ b/addons/map/XEH_preInit.sqf @@ -1,35 +1,12 @@ #include "script_component.hpp" ADDON = false; +LOG(MSG_INIT); -PREP(addLineMarker); PREP(blueForceTrackingModule); PREP(blueForceTrackingUpdate); -PREP(calculateMapScale); -PREP(cancelDrawing); -PREP(canDraw); -PREP(canUseMapTools); -PREP(canUseMapGPS); -PREP(copyMapReceiveMarkers); -PREP(copyMapRemoteSend); -PREP(copyMapStart); -PREP(handleKeyDown); -PREP(handleMouseButton); -PREP(handleMouseMove); -PREP(handleMouseZChanged); -PREP(isInsideMapTool); -PREP(mapStateUpdater); -PREP(openMapGps); -PREP(openMapGpsUpdate); -PREP(removeLineMarker); -PREP(updateMapToolMarkers); -PREP(updateLineMarker); - -//Add Event Handlers: -["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler); -["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler); - -["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler); -["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler); +PREP(determineMapLight); +PREP(determineZoom); +PREP(updateMapEffects); ADDON = true; diff --git a/addons/map/XEH_preInitServer.sqf b/addons/map/XEH_preInitServer.sqf deleted file mode 100644 index 1614e9a340..0000000000 --- a/addons/map/XEH_preInitServer.sqf +++ /dev/null @@ -1,6 +0,0 @@ -// by CAA-Picard - -#include "script_component.hpp" - -GVAR(drawing_serverLineMarkers) = []; -publicVariable QGVAR(drawing_serverLineMarkers); diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 36a6f85168..a5c8e925ca 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -1,15 +1,15 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {"ACE_MapTools"}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"KoffeinFlummi","CAA-Picard"}; - authorUrl = "https://github.com/KoffeinFlummi/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common", "ace_interaction"}; + author[] = {"KoffeinFlummi","Rocko","CAA-Picard"}; + authorUrl = "https://github.com/KoffeinFlummi/"; + VERSION_CONFIG; + }; }; class RscControlsGroup; @@ -28,10 +28,6 @@ class ACE_Settings { value = 1.0; typeName = "SCALAR"; }; - class GVAR(EveryoneCanDrawOnBriefing) { - value = 1; - typeName = "BOOL"; - }; class GVAR(BFT_Enabled) { value = 0; typeName = "BOOL"; @@ -40,116 +36,125 @@ class ACE_Settings { value = 0; typeName = "BOOL"; }; + class GVAR(mapIllumination) { + value = 1; + typeName = "BOOL"; + }; + class GVAR(mapShake) { + value = 1; + typeName = "BOOL"; + }; + class GVAR(mapLimitZoom) { + value = 0; + typeName = "BOOL"; + }; }; -#include "MapGpsUI.hpp" #include "CfgEventHandlers.hpp" #include "CfgMarkers.hpp" #include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" - class RscMapControl { - sizeExGrid = 0.032; + sizeExGrid = 0.032; }; // REGULAR MAP class RscDisplayMainMap { - // get rid of the "center to player position" - button (as it works even on elite) - class controls { - class TopRight: RscControlsGroup { - #include "MapControls.hpp" + // get rid of the "center to player position" - button (as it works even on elite) + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; }; - }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; + // scale up the compass + class objects { + class Compass: RscObject { + scale = 0.7; + zoomDuration = 0; + }; }; - }; }; // DIARY class RscDisplayDiary { - // get rid of the "center to player position" - button (as it works even on elite) - class controls { - class TopRight: RscControlsGroup { - class controls { - class ButtonPlayer: RscActiveText { - text = ""; - w = 0; - h = 0; - sizeEx = 0; - onButtonClick = ""; + // get rid of the "center to player position" - button (as it works even on elite) + class controls { + class TopRight: RscControlsGroup { + class controls { + class ButtonPlayer: RscActiveText { + text = ""; + w = 0; + h = 0; + sizeEx = 0; + onButtonClick = ""; + }; + class CA_PlayerName: RscText { + x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class ProfilePicture: RscPicture { + x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class ProfileBackground: RscText { + x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class Separator1: RscPicture { + x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + }; }; - class CA_PlayerName: RscText { - x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class ProfilePicture: RscPicture { - x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class ProfileBackground: RscText { - x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - class Separator1: RscPicture { - x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - }; - }; }; - }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; + // scale up the compass + class objects { + class Compass: RscObject { + scale = 0.7; + zoomDuration = 0; + }; }; - }; }; // BRIEFING SCREEN class RscDisplayGetReady: RscDisplayMainMap { - // get rid of the "center to player position" - button (as it works even on elite) - class controls { - class TopRight: RscControlsGroup { - #include "MapControls.hpp" + // get rid of the "center to player position" - button (as it works even on elite) + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; }; - }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; + // scale up the compass + class objects { + class Compass: RscObject { + scale = 0.7; + zoomDuration = 0; + }; }; - }; }; class RscDisplayClientGetReady: RscDisplayGetReady { - // get rid of the "center to player position" - button (as it works even on elite) - class controls { - class TopRight: RscControlsGroup { - #include "MapControls.hpp" + // get rid of the "center to player position" - button (as it works even on elite) + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; }; - }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; + // scale up the compass + class objects { + class Compass: RscObject { + scale = 0.7; + zoomDuration = 0; + }; }; - }; }; class RscDisplayServerGetReady: RscDisplayGetReady { - // get rid of the "center to player position" - button (as it works even on elite) - class controls { - class TopRight: RscControlsGroup { - #include "MapControls.hpp" + // get rid of the "center to player position" - button (as it works even on elite) + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; }; - }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; + // scale up the compass + class objects { + class Compass: RscObject { + scale = 0.7; + zoomDuration = 0; + }; }; - }; }; diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index b2619155c2..030daeaa36 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -2,37 +2,37 @@ // Delete last set of markers (always) { - deleteMarkerLocal _x; + deleteMarkerLocal _x; } forEach GVAR(BFT_markers); if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { - _groupsToDrawMarkers = []; - _playerSide = call EFUNC(common,playerSide); + _groupsToDrawMarkers = []; + _playerSide = call EFUNC(common,playerSide); - if (GVAR(BFT_HideAiGroups)) then { - _groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter); - } else { - _groupsToDrawMarkers = [allGroups, { - _anyPlayers = { - [_x] call EFUNC(common,isPlayer); - } count units _this; - (side _this == _playerSide) && _anyPlayers > 0 - }] call EFUNC(common,filter); - }; + if !(GVAR(BFT_HideAiGroups)) then { + _groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter); + } else { + _groupsToDrawMarkers = [allGroups, { + _anyPlayers = { + [_x] call EFUNC(common,isPlayer); + } count units _this; + (side _this == _playerSide) && _anyPlayers > 0 + }] call EFUNC(common,filter); + }; + + { + _markerType = [_x] call EFUNC(common,getMarkerType); - { - _markerType = [_x] call EFUNC(common,getMarkerType); + _colour = format ["Color%1", side _x]; - _colour = format ["Color%1", side _x]; + _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; + _marker setMarkerTypeLocal _markerType; + _marker setMarkerColorLocal _colour; + _marker setMarkerTextLocal (groupID _x); - _marker = createMarkerLocal [format ["ACE_BFT_%1", _i], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; - _marker setMarkerTypeLocal _markerType; - _marker setMarkerColorLocal _colour; - _marker setMarkerTextLocal (groupID _x); - - GVAR(BFT_markers) pushBack _marker; - } forEach _groupsToDrawMarkers; + GVAR(BFT_markers) pushBack _marker; + } forEach _groupsToDrawMarkers; }; diff --git a/addons/mapfx/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf similarity index 100% rename from addons/mapfx/functions/fnc_determineMapLight.sqf rename to addons/map/functions/fnc_determineMapLight.sqf diff --git a/addons/mapfx/functions/fnc_determineZoom.sqf b/addons/map/functions/fnc_determineZoom.sqf similarity index 100% rename from addons/mapfx/functions/fnc_determineZoom.sqf rename to addons/map/functions/fnc_determineZoom.sqf diff --git a/addons/mapfx/functions/fnc_updateMapFx.sqf b/addons/map/functions/fnc_updateMapEffects.sqf similarity index 100% rename from addons/mapfx/functions/fnc_updateMapFx.sqf rename to addons/map/functions/fnc_updateMapEffects.sqf diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index afc6c2cec2..e3e2a6fe93 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -2,147 +2,6 @@ - - Map Tools - Herramientas de mapa - Outils de navigation - Narzędzia nawigacyjne - Kartenwerkzeug - Pomůcky k Mapě - Strumenti Cartografici - Ferramentas de Mapa - Térképészeti eszközök - Инструменты карты - - - The Map Tools allow you to measure distances and angles on the map. - Las herramientas de mapa permiten medir distancias y ángulos en el mapa. - Les outils de navigation permettent de mesurer des distances et des angles sur la carte. - Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie. - Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen. - Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě. - Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa. - As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa. - A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen. - Картографические инструменты позволяют измерять расстояния и углы на карте. - - - Map Tools >> - Herramientas de mapa >> - Outils de navigation >> - Narzędzia nawigacyjne >> - Kartenwerkzeug >> - Pomůcky k Mapě >> - Strumenti Cartografici >> - Ferramentas de Mapa >> - Térképészeti eszközök >> - Инструменты карты >> - - - Hide Map Tool - Verstecke Kartenwerkzeug - Ocultar herr. de mapa - Ranger les outils - Nascondi Strumenti Cartografici - Ocultar Ferramenta de Mapa - Térképészeti eszközök elrejtése - Ukryj narzędzia nawigacyjne - Schovat pomůcku k mapě - Скрыть инструменты - - - Show Normal Map Tool - Zeige Kartenwerkzeug (normal) - Mostrar herr. de mapa normal - Montrer outils normaux - Visualizza Strumenti Cartografici standard - Mostrar Ferramenta de Mapa Padrão - Térképészeti eszköz megjelenítése (normál méret) - Pokaż normalne narzędzia nawigacyjne - Zobrazit normální pomůcku k mapě - Показать инструменты (средн. размер) - - - Show Small Map Tool - Zeige Kartenwerkzeug (klein) - Mostrar herr. de mapa pequeñas - Montrer petits outils - Visualizza Strumenti Cartografici piccoli - Mostrar Ferramenta de Mapa Pequena - Térképészeti eszköz megjelenítése (kicsinyített) - Pokaż pomniejszone narzędzia nawigacyjne - Zobrazit malou pomůcku k mapě - Показать инструменты (малый размер) - - - Align Map Tool to North - Kartenwerkzeug nach Norden ausrichten - Alinear herr. de mapa al norte - Aligner au nord - Allinea gli Strumenti Cartografici con il Nord - Alinhar Ferramenta de Mapa com o Norte - Térképészeti eszköz Északhoz állítása - Wyrównaj linijkę do północy - Srovnat pomůcku k mapě na sever - Выровнять инструменты на север - - - Align Map Tool to Compass - Kartenwerkzeug am Kompass ausrichten - Alinear herr. de mapa a la brújula - Aligner sur la boussole - Allinea gli Strumenti Cartografici con la bussola - Alinhar Ferramenta de Mapa com a Bússola - Térképészeti eszköz iránytűhöz állítása - Wyrównaj linijkę do kompasu - Srovnat pomůcku k mapě ke kompasu - Выровнять инструменты по компасу - - - Show GPS on Map - Zeige GPS auf der Karte - Mostrar el GPS sobre el mapa - Ranger le GPS - Visualizza il GPS sulla mappa - Mostrar GPS no Mapa - GPS megjelnítése a térképen - Pokaż GPS na mapie - Zobrazit GPS na mapě - Показать GPS на карте - - - Hide GPS on Map - Verstecke GPS auf der Karte - Ocultar el GPS del mapa - Montrer le GPS - Nascondi il GPS sulla mappa - Ocultar GPS no Mapa - GPS elrejtése térképről - Ukryj GPS na mapie - Schovat GPS na mapě - Скрыть GPS на карте - - - Copy Map - Karte kopieren - Copiar mapa - Скопировать карту - Kopiuj oznaczenia mapy - Copier la carte - Zkopírovat mapu - Copiare Carta - Térkép másolása - Copiar Mapa - - - Direction: %1° - Drehung: %1° - Direction: %1° - Směr: %1° - Kierunek: %1° - Dirección: %1° - Irány: %1 - Направление:%1 - + \ No newline at end of file diff --git a/addons/mapfx/$PBOPREFIX$ b/addons/mapfx/$PBOPREFIX$ deleted file mode 100644 index 9c3497b963..0000000000 --- a/addons/mapfx/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -x\ace\addons\mapfx \ No newline at end of file diff --git a/addons/mapfx/XEH_postClientInit.sqf b/addons/mapfx/XEH_postClientInit.sqf deleted file mode 100644 index 111bcbb171..0000000000 --- a/addons/mapfx/XEH_postClientInit.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; -LOG(MSG_INIT); - -// Calculate the maximum zoom allowed for this map -call FUNC(determineZoom); - -[] spawn { - // Wait until the map display is detected - waitUntil {(!isNull findDisplay 12)}; - - GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; - GVAR(lastStillTime) = time; - GVAR(isShaking) = false; - - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapFx);}]; - -}; - -ADDON = true; diff --git a/addons/mapfx/XEH_preInit.sqf b/addons/mapfx/XEH_preInit.sqf deleted file mode 100644 index ecdf9cf694..0000000000 --- a/addons/mapfx/XEH_preInit.sqf +++ /dev/null @@ -1,11 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -ADDON = false; -LOG(MSG_INIT); - -PREP(determineMapLight); -PREP(determineZoom); -PREP(updateMapFx); - -ADDON = true; diff --git a/addons/mapfx/config.cpp b/addons/mapfx/config.cpp deleted file mode 100644 index 1cdb1e93c1..0000000000 --- a/addons/mapfx/config.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "script_component.hpp" -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction"}; - author[] = {"Rocko","CAA-Picard"}; - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" - -class ACE_Settings { - class GVAR(mapIllumination) { - value = 1; - typeName = "BOOL"; - }; - class GVAR(mapShake) { - value = 1; - typeName = "BOOL"; - }; - class GVAR(mapLimitZoom) { - value = 0; - typeName = "BOOL"; - }; -}; \ No newline at end of file diff --git a/addons/mapfx/functions/script_component.hpp b/addons/mapfx/functions/script_component.hpp deleted file mode 100644 index 647b0b1581..0000000000 --- a/addons/mapfx/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\mapfx\script_component.hpp" diff --git a/addons/mapfx/script_component.hpp b/addons/mapfx/script_component.hpp deleted file mode 100644 index 63c4470744..0000000000 --- a/addons/mapfx/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT mapfx -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_MAPFX - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_MAPFX - #define DEBUG_SETTINGS DEBUG_SETTINGS_MAPFX -#endif - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/maptools/$PBOPREFIX$ b/addons/maptools/$PBOPREFIX$ new file mode 100644 index 0000000000..11a24a58d8 --- /dev/null +++ b/addons/maptools/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\Addons\map \ No newline at end of file diff --git a/addons/mapfx/CfgEventhandlers.hpp b/addons/maptools/CfgEventHandlers.hpp similarity index 52% rename from addons/mapfx/CfgEventhandlers.hpp rename to addons/maptools/CfgEventHandlers.hpp index 23dbe58c74..27bbf326d3 100644 --- a/addons/mapfx/CfgEventhandlers.hpp +++ b/addons/maptools/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postClientInit)); + clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) ); }; }; diff --git a/addons/maptools/CfgMarkers.hpp b/addons/maptools/CfgMarkers.hpp new file mode 100644 index 0000000000..8a2b86fc13 --- /dev/null +++ b/addons/maptools/CfgMarkers.hpp @@ -0,0 +1,26 @@ +// MARKERS +class CfgMarkers { + class ACE_MapToolFixed { + name = "MapToolFixed"; + icon = PATHTOF(data\mapToolFixed.paa); + scope = 0; + color[] = {1,1,1,1}; + size = 32; + }; + + class ACE_MapToolRotatingNormal { + name = "MapToolRotating"; + icon = PATHTOF(data\mapToolRotatingNormal.paa); + scope = 0; + color[] = {1,1,1,1}; + size = 32; + }; + + class ACE_MapToolRotatingSmall { + name = "MapToolRotating"; + icon = PATHTOF(data\mapToolRotatingSmall.paa); + scope = 0; + color[] = {1,1,1,1}; + size = 32; + }; +}; diff --git a/addons/maptools/CfgVehicles.hpp b/addons/maptools/CfgVehicles.hpp new file mode 100644 index 0000000000..9963f6b067 --- /dev/null +++ b/addons/maptools/CfgVehicles.hpp @@ -0,0 +1,133 @@ +#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ + name = #ITEM; \ + count = COUNT; \ + }; + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + + class ACE_MapTools { + displayName = "$STR_ACE_MapTools_MapTools_Menu"; + condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)})); + statement = ""; + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 0; + priority = 100; + enableInside = 1; + + class ACE_MapToolsHide { + displayName = "$STR_ACE_MapTools_MapToolsHide"; + condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); + statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 1; + priority = 5; + enableInside = 1; + }; + class ACE_MapToolsShowNormal { + displayName = "$STR_ACE_MapTools_MapToolsShowNormal"; + condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1})); + statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 1; + priority = 4; + enableInside = 1; + }; + class ACE_MapToolsShowSmall { + displayName = "$STR_ACE_MapTools_MapToolsShowSmall"; + condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2})); + statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 1; + priority = 3; + enableInside = 1; + }; + class ACE_MapToolsAlignNorth { + displayName = "$STR_ACE_MapTools_MapToolsAlignNorth"; + condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); + statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 1; + priority = 2; + enableInside = 1; + }; + class ACE_MapToolsAlignCompass { + displayName = "$STR_ACE_MapTools_MapToolsAlignCompass"; + condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}})); + statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 1; + priority = 1; + enableInside = 1; + }; + class ACE_MapGpsShow { + displayName = "$STR_ACE_MapTools_MapGpsShow"; + condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)})); + statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 0; + priority = 0; + enableInside = 1; + }; + class ACE_MapGpsHide { + displayName = "$STR_ACE_MapTools_MapGpsHide"; + condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)})); + statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps)); + exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + showDisabled = 0; + priority = 0; + enableInside = 1; + }; + }; + }; + + class ACE_Actions { + class ACE_MainActions { + class ACE_CopyMap { + displayName = "$STR_ACE_MapTools_CopyMap"; + condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target})); + statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart)); + showDisabled = 0; + priority = -1; + }; + }; + }; + }; + + class NATO_Box_Base; + class EAST_Box_Base; + class IND_Box_Base; + class FIA_Box_Base_F; + + class Box_NATO_Support_F: NATO_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_MapTools,12) + }; + }; + + class Box_East_Support_F: EAST_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_MapTools,12) + }; + }; + + class Box_IND_Support_F: IND_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_MapTools,12) + }; + }; + + class Box_FIA_Support_F: FIA_Box_Base_F { + class TransportItems { + MACRO_ADDITEM(ACE_MapTools,12) + }; + }; + + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_MapTools,12) + }; + }; +}; diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp new file mode 100644 index 0000000000..9d4d313c43 --- /dev/null +++ b/addons/maptools/CfgWeapons.hpp @@ -0,0 +1,15 @@ +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_MapTools: ACE_ItemCore { + displayName = "$STR_ACE_MapTools_Name"; + descriptionShort = "$STR_ACE_MapTools_Description"; + model = "\A3\weapons_F\ammo\mag_univ.p3d"; + picture = PATHTOF(UI\maptool_item.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + }; + }; +}; diff --git a/addons/maptools/MapControls.hpp b/addons/maptools/MapControls.hpp new file mode 100644 index 0000000000..409796a6b1 --- /dev/null +++ b/addons/maptools/MapControls.hpp @@ -0,0 +1,80 @@ +class controls { + class CA_PlayerName: RscText { + x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class ProfilePicture: RscPicture { + x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class ProfileBackground: RscText { + x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class Separator1: RscPicture { + x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + }; + class ColorBlack: RscButton { + idc = 36732; + x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.2,0.2,0.2,1}; + colorBackgroundActive[] = {0,0,0,1}; + colorFocused[] = {0,0,0,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlack')]); + }; + class ColorRed: RscButton { + idc = 36733; + x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.8,0.2,0.2,1}; + colorBackgroundActive[] = {1,0,0,1}; + colorFocused[] = {1,0,0,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorRed')]); + }; + class ColorGreen: RscButton { + idc = 36734; + x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.2,0.8,0.2,1}; + colorBackgroundActive[] = {0,1,0,1}; + colorFocused[] = {0,1,0,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorGreen')]); + }; + class ColorBlue: RscButton { + idc = 36735; + x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.2,0.2,0.8,1}; + colorBackgroundActive[] = {0,0,1,1}; + colorFocused[] = {0,0,1,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlue')]); + }; + class ColorYellow: RscButton { + idc = 36736; + x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.8,0.8,0.2,1}; + colorBackgroundActive[] = {1,1,0,1}; + colorFocused[] = {1,1,0,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorYellow')]); + }; + class ColorWhite: RscButton { + idc = 36737; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0.8,0.8,0.8,1}; + colorBackgroundActive[] = {1,1,1,1}; + colorFocused[] = {1,1,1,1}; + onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorWhite')]); + }; +}; diff --git a/addons/maptools/MapGpsUI.hpp b/addons/maptools/MapGpsUI.hpp new file mode 100644 index 0000000000..ff8ec8b96e --- /dev/null +++ b/addons/maptools/MapGpsUI.hpp @@ -0,0 +1,79 @@ +#define GUI_GRID_X (0) +#define GUI_GRID_Y (0) +#define GUI_GRID_W (0.025) +#define GUI_GRID_H (0.04) + +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 + +#define W_gps 0.4025 +#define H_gps 0.25 +#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps +#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps + +class RscTitles { + class RscACE_MapGps { + idd = 9855; + movingEnable = 1; + duration = 3600; + fadein = 0; + fadeout = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ui_mapGpsDisplay)), _this select 0)];); + class controls { + class back:RscPicture { + x = X_gps; + y = Y_gps; + w = W_gps; + h = H_gps; + text = PATHTOF(UI\mapGps.paa); + colorBackground[] = {1, 1, 1, 1}; + }; + class heading: RscText{ + idc = 913590; + x = X_gps + W_gps * 0.25; + y = Y_gps + H_gps * 0.12; + w = W_gps * 0.2; + h = H_gps * 0.16; + style = ST_LEFT; + text = "225"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.247,0.251,0.157,1}; + shadowColo[] = {0,0,0,0}; + font = "EtelkaNarrowMediumPro"; + shadow = 0; + sizeEx = 0.042; + }; + class altitude: RscText{ + idc = 913591; + x = X_gps + W_gps * 0.55; + y = Y_gps + H_gps * 0.12; + w = W_gps * 0.2; + h = H_gps * 0.16; + style = ST_RIGHT; + text = "55 m"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.247,0.251,0.157,1}; + shadowColo[] = {0,0,0,0}; + font = "EtelkaNarrowMediumPro"; + shadow = 0; + sizeEx = 0.042; + }; + class coordinates: RscText{ + idc = 913592; + x = X_gps + W_gps * 0.2; + y = Y_gps + H_gps * 0.33; + w = W_gps * 0.6; + h = H_gps * 0.35; + style = ST_CENTER; + text = "012.3 115.1"; + colorBackground[] = {0,0,0,0}; + colorText[] = {0.247,0.251,0.157,1}; + shadowColo[] = {0,0,0,0}; + font = "EtelkaNarrowMediumPro"; + shadow = 0; + sizeEx = 0.1; + }; + }; + }; +}; diff --git a/addons/maptools/README.md b/addons/maptools/README.md new file mode 100644 index 0000000000..9248948efa --- /dev/null +++ b/addons/maptools/README.md @@ -0,0 +1,14 @@ +ace_maptools +============ + +Map tools: +- Roamer +- Map drawing +- Showing GPS on map + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [esteldunedain](https://github.com/esteldunedain) +- [NouberNou](https://github.com/NouberNou) diff --git a/addons/maptools/UI/IconBFTracking_ca.paa b/addons/maptools/UI/IconBFTracking_ca.paa new file mode 100644 index 0000000000..128f08f6f0 Binary files /dev/null and b/addons/maptools/UI/IconBFTracking_ca.paa differ diff --git a/addons/map/UI/mapGps.paa b/addons/maptools/UI/mapGps.paa similarity index 100% rename from addons/map/UI/mapGps.paa rename to addons/maptools/UI/mapGps.paa diff --git a/addons/map/UI/maptool_item.paa b/addons/maptools/UI/maptool_item.paa similarity index 100% rename from addons/map/UI/maptool_item.paa rename to addons/maptools/UI/maptool_item.paa diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf new file mode 100644 index 0000000000..167c89f245 --- /dev/null +++ b/addons/maptools/XEH_postInitClient.sqf @@ -0,0 +1,70 @@ +// by CAA-Picard + +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +// Init variables +GVAR(mapVisableLastFrame) = false; +GVAR(mapGpsShow) = true; + +GVAR(mapTool_Shown) = 0; +GVAR(mapTool_pos) = [0,0]; +GVAR(mapTool_angle) = 0; +GVAR(mapTool_isDragging) = false; +GVAR(mapTool_isRotating) = false; + +GVAR(drawing_isDrawing) = false; +GVAR(drawing_tempLineMarker) = []; +GVAR(drawing_lineMarkers) = []; +GVAR(drawing_drawColor) = "ColorBlack"; +GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737]; + +[] spawn { + _fnc_installMapEvents = { + _d = _this; + diag_log format ["Installing EH in display %1", _d]; + ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}]; + ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}]; + ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}]; + ((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}]; + (finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}]; + }; + + // Wait until the briefing map is detected + // display = 37 for SP + // display = 52 for host server on MP; + // display = 53 for MP clients) + waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)}; + + if (isNull findDisplay 12) then { + // Install event handlers on the map control of the briefing screen (control = 51) + GVAR(drawing_syncMarkers) = true; + if (!isNull findDisplay 52) then { + 52 call _fnc_installMapEvents; + } else { + if (!isNull findDisplay 53) then { + 53 call _fnc_installMapEvents; + } else { + 37 call _fnc_installMapEvents; + }; + }; + } else { + // Briefing screen was skipped; the player is JIP, create the markers defined during the briefing + GVAR(drawing_syncMarkers) = false; + { + _x call FUNC(addLineMarker); + } forEach GVAR(drawing_serverLineMarkers); + }; + + // Wait until the main map display is detected (display = 12) + waitUntil { !isNull findDisplay 12 }; + // Install event handlers on the map control and display (control = 51) + GVAR(drawing_syncMarkers) = false; + 12 call _fnc_installMapEvents; + + // Update the size and rotation of map tools + [] call FUNC(updateMapToolMarkers); + + [FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf new file mode 100644 index 0000000000..20777fb118 --- /dev/null +++ b/addons/maptools/XEH_preInit.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(addLineMarker); +PREP(calculateMapScale); +PREP(cancelDrawing); +PREP(canDraw); +PREP(canUseMapTools); +PREP(canUseMapGPS); +PREP(copyMapReceiveMarkers); +PREP(copyMapRemoteSend); +PREP(copyMapStart); +PREP(handleKeyDown); +PREP(handleMouseButton); +PREP(handleMouseMove); +PREP(handleMouseZChanged); +PREP(isInsideMapTool); +PREP(mapStateUpdater); +PREP(openMapGps); +PREP(openMapGpsUpdate); +PREP(removeLineMarker); +PREP(updateMapToolMarkers); +PREP(updateLineMarker); + +if (isServer) then { + GVAR(drawing_serverLineMarkers) = []; + publicVariable QGVAR(drawing_serverLineMarkers); +}; + +//Add Event Handlers: +["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler); +["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler); + +["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler); +["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler); + +ADDON = true; diff --git a/addons/maptools/config.cpp b/addons/maptools/config.cpp new file mode 100644 index 0000000000..ea39ca7708 --- /dev/null +++ b/addons/maptools/config.cpp @@ -0,0 +1,74 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {"ACE_MapTools"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common", "ace_interaction"}; + author[] = {"CAA-Picard"}; + authorUrl = "https://github.com/esteldunedain/"; + VERSION_CONFIG; + }; +}; + +class ACE_Settings { + class GVAR(EveryoneCanDrawOnBriefing) { + value = 1; + typeName = "BOOL"; + }; +}; + +class RscControlsGroup; +class RscActiveText; +class RscPicture; +class RscText; +class RscObject; +class RscButton; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenu; +class RscEdit; + +#include "MapGpsUI.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMarkers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" + + +// REGULAR MAP +class RscDisplayMainMap { + // Create the drawing color selector + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; + }; +}; + +// BRIEFING SCREEN +class RscDisplayGetReady: RscDisplayMainMap { + // Create the drawing color selector + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; + }; +}; +class RscDisplayClientGetReady: RscDisplayGetReady { + // Create the drawing color selector + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; + }; +}; +class RscDisplayServerGetReady: RscDisplayGetReady { + // Create the drawing color selector + class controls { + class TopRight: RscControlsGroup { + #include "MapControls.hpp" + }; + }; +}; diff --git a/addons/map/data/mapToolFixed.paa b/addons/maptools/data/mapToolFixed.paa similarity index 100% rename from addons/map/data/mapToolFixed.paa rename to addons/maptools/data/mapToolFixed.paa diff --git a/addons/map/data/mapToolRotatingNormal.paa b/addons/maptools/data/mapToolRotatingNormal.paa similarity index 100% rename from addons/map/data/mapToolRotatingNormal.paa rename to addons/maptools/data/mapToolRotatingNormal.paa diff --git a/addons/map/data/mapToolRotatingSmall.paa b/addons/maptools/data/mapToolRotatingSmall.paa similarity index 100% rename from addons/map/data/mapToolRotatingSmall.paa rename to addons/maptools/data/mapToolRotatingSmall.paa diff --git a/addons/map/functions/fnc_addLineMarker.sqf b/addons/maptools/functions/fnc_addLineMarker.sqf similarity index 100% rename from addons/map/functions/fnc_addLineMarker.sqf rename to addons/maptools/functions/fnc_addLineMarker.sqf diff --git a/addons/map/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf similarity index 100% rename from addons/map/functions/fnc_calculateMapScale.sqf rename to addons/maptools/functions/fnc_calculateMapScale.sqf diff --git a/addons/map/functions/fnc_canDraw.sqf b/addons/maptools/functions/fnc_canDraw.sqf similarity index 100% rename from addons/map/functions/fnc_canDraw.sqf rename to addons/maptools/functions/fnc_canDraw.sqf diff --git a/addons/map/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf similarity index 100% rename from addons/map/functions/fnc_canUseMapGPS.sqf rename to addons/maptools/functions/fnc_canUseMapGPS.sqf diff --git a/addons/map/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf similarity index 100% rename from addons/map/functions/fnc_canUseMapTools.sqf rename to addons/maptools/functions/fnc_canUseMapTools.sqf diff --git a/addons/map/functions/fnc_cancelDrawing.sqf b/addons/maptools/functions/fnc_cancelDrawing.sqf similarity index 100% rename from addons/map/functions/fnc_cancelDrawing.sqf rename to addons/maptools/functions/fnc_cancelDrawing.sqf diff --git a/addons/map/functions/fnc_copyMapReceiveMarkers.sqf b/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf similarity index 100% rename from addons/map/functions/fnc_copyMapReceiveMarkers.sqf rename to addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf diff --git a/addons/map/functions/fnc_copyMapRemoteSend.sqf b/addons/maptools/functions/fnc_copyMapRemoteSend.sqf similarity index 100% rename from addons/map/functions/fnc_copyMapRemoteSend.sqf rename to addons/maptools/functions/fnc_copyMapRemoteSend.sqf diff --git a/addons/map/functions/fnc_copyMapStart.sqf b/addons/maptools/functions/fnc_copyMapStart.sqf similarity index 100% rename from addons/map/functions/fnc_copyMapStart.sqf rename to addons/maptools/functions/fnc_copyMapStart.sqf diff --git a/addons/map/functions/fnc_handleKeyDown.sqf b/addons/maptools/functions/fnc_handleKeyDown.sqf similarity index 100% rename from addons/map/functions/fnc_handleKeyDown.sqf rename to addons/maptools/functions/fnc_handleKeyDown.sqf diff --git a/addons/map/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf similarity index 100% rename from addons/map/functions/fnc_handleMouseButton.sqf rename to addons/maptools/functions/fnc_handleMouseButton.sqf diff --git a/addons/map/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf similarity index 100% rename from addons/map/functions/fnc_handleMouseMove.sqf rename to addons/maptools/functions/fnc_handleMouseMove.sqf diff --git a/addons/map/functions/fnc_handleMouseZChanged.sqf b/addons/maptools/functions/fnc_handleMouseZChanged.sqf similarity index 100% rename from addons/map/functions/fnc_handleMouseZChanged.sqf rename to addons/maptools/functions/fnc_handleMouseZChanged.sqf diff --git a/addons/map/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf similarity index 100% rename from addons/map/functions/fnc_isInsideMapTool.sqf rename to addons/maptools/functions/fnc_isInsideMapTool.sqf diff --git a/addons/map/functions/fnc_mapStateUpdater.sqf b/addons/maptools/functions/fnc_mapStateUpdater.sqf similarity index 100% rename from addons/map/functions/fnc_mapStateUpdater.sqf rename to addons/maptools/functions/fnc_mapStateUpdater.sqf diff --git a/addons/map/functions/fnc_openMapGps.sqf b/addons/maptools/functions/fnc_openMapGps.sqf similarity index 100% rename from addons/map/functions/fnc_openMapGps.sqf rename to addons/maptools/functions/fnc_openMapGps.sqf diff --git a/addons/map/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf similarity index 100% rename from addons/map/functions/fnc_openMapGpsUpdate.sqf rename to addons/maptools/functions/fnc_openMapGpsUpdate.sqf diff --git a/addons/map/functions/fnc_removeLineMarker.sqf b/addons/maptools/functions/fnc_removeLineMarker.sqf similarity index 100% rename from addons/map/functions/fnc_removeLineMarker.sqf rename to addons/maptools/functions/fnc_removeLineMarker.sqf diff --git a/addons/map/functions/fnc_updateLineMarker.sqf b/addons/maptools/functions/fnc_updateLineMarker.sqf similarity index 100% rename from addons/map/functions/fnc_updateLineMarker.sqf rename to addons/maptools/functions/fnc_updateLineMarker.sqf diff --git a/addons/map/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf similarity index 100% rename from addons/map/functions/fnc_updateMapToolMarkers.sqf rename to addons/maptools/functions/fnc_updateMapToolMarkers.sqf diff --git a/addons/maptools/functions/script_component.hpp b/addons/maptools/functions/script_component.hpp new file mode 100644 index 0000000000..adeb2788b5 --- /dev/null +++ b/addons/maptools/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\maptools\script_component.hpp" diff --git a/addons/maptools/script_component.hpp b/addons/maptools/script_component.hpp new file mode 100644 index 0000000000..a3dad97a49 --- /dev/null +++ b/addons/maptools/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT maptools +#include "\z\ace\Addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MAPTOOLS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAPTOOLS + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAPTOOLS +#endif + +#include "\z\ace\Addons\main\script_macros.hpp" + + +#define MARKERNAME_MAPTOOL_FIXED "ACE_MapToolFixed" +#define MARKERNAME_MAPTOOL_ROTATINGNORMAL "ACE_MapToolRotatingNormal" +#define MARKERNAME_MAPTOOL_ROTATINGSMALL "ACE_MapToolRotatingSmall" diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml new file mode 100644 index 0000000000..1658856128 --- /dev/null +++ b/addons/maptools/stringtable.xml @@ -0,0 +1,148 @@ + + + + + + Map Tools + Herramientas de mapa + Outils de navigation + Narzędzia nawigacyjne + Kartenwerkzeug + Pomůcky k Mapě + Strumenti Cartografici + Ferramentas de Mapa + Térképészeti eszközök + Инструменты карты + + + The Map Tools allow you to measure distances and angles on the map. + Las herramientas de mapa permiten medir distancias y ángulos en el mapa. + Les outils de navigation permettent de mesurer des distances et des angles sur la carte. + Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie. + Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen. + Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě. + Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa. + As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa. + A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen. + Картографические инструменты позволяют измерять расстояния и углы на карте. + + + Map Tools >> + Herramientas de mapa >> + Outils de navigation >> + Narzędzia nawigacyjne >> + Kartenwerkzeug >> + Pomůcky k Mapě >> + Strumenti Cartografici >> + Ferramentas de Mapa >> + Térképészeti eszközök >> + Инструменты карты >> + + + Hide Map Tool + Verstecke Kartenwerkzeug + Ocultar herr. de mapa + Ranger les outils + Nascondi Strumenti Cartografici + Ocultar Ferramenta de Mapa + Térképészeti eszközök elrejtése + Ukryj narzędzia nawigacyjne + Schovat pomůcku k mapě + Скрыть инструменты + + + Show Normal Map Tool + Zeige Kartenwerkzeug (normal) + Mostrar herr. de mapa normal + Montrer outils normaux + Visualizza Strumenti Cartografici standard + Mostrar Ferramenta de Mapa Padrão + Térképészeti eszköz megjelenítése (normál méret) + Pokaż normalne narzędzia nawigacyjne + Zobrazit normální pomůcku k mapě + Показать инструменты (средн. размер) + + + Show Small Map Tool + Zeige Kartenwerkzeug (klein) + Mostrar herr. de mapa pequeñas + Montrer petits outils + Visualizza Strumenti Cartografici piccoli + Mostrar Ferramenta de Mapa Pequena + Térképészeti eszköz megjelenítése (kicsinyített) + Pokaż pomniejszone narzędzia nawigacyjne + Zobrazit malou pomůcku k mapě + Показать инструменты (малый размер) + + + Align Map Tool to North + Kartenwerkzeug nach Norden ausrichten + Alinear herr. de mapa al norte + Aligner au nord + Allinea gli Strumenti Cartografici con il Nord + Alinhar Ferramenta de Mapa com o Norte + Térképészeti eszköz Északhoz állítása + Wyrównaj linijkę do północy + Srovnat pomůcku k mapě na sever + Выровнять инструменты на север + + + Align Map Tool to Compass + Kartenwerkzeug am Kompass ausrichten + Alinear herr. de mapa a la brújula + Aligner sur la boussole + Allinea gli Strumenti Cartografici con la bussola + Alinhar Ferramenta de Mapa com a Bússola + Térképészeti eszköz iránytűhöz állítása + Wyrównaj linijkę do kompasu + Srovnat pomůcku k mapě ke kompasu + Выровнять инструменты по компасу + + + Show GPS on Map + Zeige GPS auf der Karte + Mostrar el GPS sobre el mapa + Ranger le GPS + Visualizza il GPS sulla mappa + Mostrar GPS no Mapa + GPS megjelnítése a térképen + Pokaż GPS na mapie + Zobrazit GPS na mapě + Показать GPS на карте + + + Hide GPS on Map + Verstecke GPS auf der Karte + Ocultar el GPS del mapa + Montrer le GPS + Nascondi il GPS sulla mappa + Ocultar GPS no Mapa + GPS elrejtése térképről + Ukryj GPS na mapie + Schovat GPS na mapě + Скрыть GPS на карте + + + Copy Map + Karte kopieren + Copiar mapa + Скопировать карту + Kopiuj oznaczenia mapy + Copier la carte + Zkopírovat mapu + Copiare Carta + Térkép másolása + Copiar Mapa + + + Direction: %1° + Drehung: %1° + Direction: %1° + Směr: %1° + Kierunek: %1° + Dirección: %1° + Irány: %1 + Направление:%1 + + + \ No newline at end of file