Replaced tabs with spaces

This commit is contained in:
ulteq 2015-04-07 20:19:35 +02:00
parent f6a9a007cc
commit c94c1c1bcb
8 changed files with 548 additions and 548 deletions

View File

@ -1,39 +1,39 @@
class CfgSounds
{
class kestrel4500_center_button_click
{
name="kestrel4500_center_button_click";
class kestrel4500_center_button_click
{
name="kestrel4500_center_button_click";
sound[]={PATHTOF(sound\kestrel_center_button_click.wav),1,1};
titles[]={};
};
class kestrel4500_top_button_click
{
name="kestrel4500_top_button_click";
titles[]={};
};
class kestrel4500_top_button_click
{
name="kestrel4500_top_button_click";
sound[]={PATHTOF(sound\kestrel_top_button_click.wav),1,1};
titles[]={};
};
class kestrel4500_right_button_click
{
name="kestrel4500_right_button_click";
titles[]={};
};
class kestrel4500_right_button_click
{
name="kestrel4500_right_button_click";
sound[]={PATHTOF(sound\kestrel_right_button_click.wav),1,1};
titles[]={};
};
class kestrel4500_bottom_button_click
{
name="kestrel4500_bottom_button_click";
titles[]={};
};
class kestrel4500_bottom_button_click
{
name="kestrel4500_bottom_button_click";
sound[]={PATHTOF(sound\kestrel_bottom_button_click.wav),1,1};
titles[]={};
};
class kestrel4500_left_button_click
{
name="kestrel4500_left_button_click";
titles[]={};
};
class kestrel4500_left_button_click
{
name="kestrel4500_left_button_click";
sound[]={PATHTOF(sound\kestrel_left_button_click.wav),1,1};
titles[]={};
};
class kestrel4500_exit_button_click
{
name="kestrel4500_exit_button_click";
titles[]={};
};
class kestrel4500_exit_button_click
{
name="kestrel4500_exit_button_click";
sound[]={PATHTOF(sound\kestrel_exit_button_click.wav),1,1};
titles[]={};
};
titles[]={};
};
};

View File

@ -4,307 +4,307 @@
class Kestrel4500_RscText
{
idc=-1;
type=0;
style=ST_CENTER;
colorDisabled[]={0,0,0,0};
colorBackground[]={0,0,0,0};
colorText[]={0,0,0,1};
text="";
x=0;
y=0;
w=0.1;
h=0.03;
font="TahomaB";
sizeEx=0.04;
shadow=0;
idc=-1;
type=0;
style=ST_CENTER;
colorDisabled[]={0,0,0,0};
colorBackground[]={0,0,0,0};
colorText[]={0,0,0,1};
text="";
x=0;
y=0;
w=0.1;
h=0.03;
font="TahomaB";
sizeEx=0.04;
shadow=0;
};
class Kestrel4500_RscButton
{
text="";
colorText[]={0,0,0,1};
colorDisabled[]={0,0,0,0};
colorBackground[]={0,0,0,0};
colorBackgroundDisabled[]={0,0,0,0};
colorBackgroundActive[]={0,0,0,0};
colorFocused[]={0,0,0,0};
colorShadow[]={0,0,0,0};
colorBorder[]={0,0,0,1};
soundEnter[]={"",0,1};
soundPush[]={"",0,1};
soundClick[]={"",0,1};
soundEscape[]={"",0,1};
type=1;
style="0x02+0x100";
x=0;
y=0;
w=0.10;
h=0.03;
font="TahomaB";
SizeEx=0.025;
offsetX=0.003;
offsetY=0.003;
offsetPressedX=0.0020;
offsetPressedY=0.0020;
borderSize=0;
shadow=0;
text="";
colorText[]={0,0,0,1};
colorDisabled[]={0,0,0,0};
colorBackground[]={0,0,0,0};
colorBackgroundDisabled[]={0,0,0,0};
colorBackgroundActive[]={0,0,0,0};
colorFocused[]={0,0,0,0};
colorShadow[]={0,0,0,0};
colorBorder[]={0,0,0,1};
soundEnter[]={"",0,1};
soundPush[]={"",0,1};
soundClick[]={"",0,1};
soundEscape[]={"",0,1};
type=1;
style="0x02+0x100";
x=0;
y=0;
w=0.10;
h=0.03;
font="TahomaB";
SizeEx=0.025;
offsetX=0.003;
offsetY=0.003;
offsetPressedX=0.0020;
offsetPressedY=0.0020;
borderSize=0;
shadow=0;
};
class Kestrel4500_Display
{
name="Kestrel4500_Display";
idd=-1;
onLoad="uiNamespace setVariable ['Kestrel4500_Display', (_this select 0)]";
movingEnable=1;
controlsBackground[]={};
objects[]={};
class controls
{
class BACKGROUND
{
moving=1;
type=0;
font="TahomaB";
SizeEX=0.025;
idc=-1;
style=48;
x=safezoneX;
y=safezoneY;
w=1.024;
h=1.024*4/3;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
name="Kestrel4500_Display";
idd=-1;
onLoad="uiNamespace setVariable ['Kestrel4500_Display', (_this select 0)]";
movingEnable=1;
controlsBackground[]={};
objects[]={};
class controls
{
class BACKGROUND
{
moving=1;
type=0;
font="TahomaB";
SizeEX=0.025;
idc=-1;
style=48;
x=safezoneX;
y=safezoneY;
w=1.024;
h=1.024*4/3;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
text=PATHTOF(UI\kestrel4500.paa);
};
class POWER: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.385;
y=safezoneY+1.125;
w=0.042;
h=0.042*4/3;
action="closeDialog 0";
onMouseButtonDown = "playSound 'kestrel4500_exit_button_click'";
};
class ENTER: POWER
{
idc=-1;
x=safezoneX+0.46;
y=safezoneY+1.0;
w=0.1;
action=QUOTE(0 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_center_button_click'";
};
class TOP: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.46;
y=safezoneY+0.93;
w=0.1;
h=0.03;
action=QUOTE(1 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_top_button_click'";
};
class BOTTOM: TOP
{
idc=-1;
y=safezoneY+1.1;
action=QUOTE(2 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_bottom_button_click'";
};
class LEFT: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.4;
y=safezoneY+0.97;
w=0.046;
h=0.11;
action=QUOTE(3 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_left_button_click'";
};
class RIGHT: LEFT
{
idc=-1;
x=safezoneX+0.58;
action=QUOTE(4 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_right_button_click'";
};
class MEMORY: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.395;
y=safezoneY+0.87;
w=0.05;
h=0.045*4/3;
action=QUOTE(5 call FUNC(buttonPressed));
};
class BACKLIGHT: MEMORY
{
idc=-1;
x=safezoneX+0.585;
action=QUOTE(6 call FUNC(buttonPressed));
};
class TEXT_TOP: Kestrel4500_RscText
{
idc=74100;
x=safezoneX+0.40;
y=safezoneY+0.58;
w=0.22;
h=0.04;
text="";
};
class TEXT_CENTER_BIG: TEXT_TOP
{
idc=74200;
y=safezoneY+0.61;
h=0.10;
SizeEx=0.06;
text="";
};
class TEXT_CENTER_LINE_1_LEFT: TEXT_TOP
{
idc=74300;
y=safezoneY+0.60;
style=ST_LEFT;
h=0.10;
SizeEx=0.05;
text="";
};
class TEXT_CENTER_LINE2_LEFT: TEXT_CENTER_LINE_1_LEFT
{
idc=74301;
y=safezoneY+0.64;
text="";
};
class TEXT_CENTER_LINE_3_LEFT: TEXT_CENTER_LINE2_LEFT
{
idc=74302;
y=safezoneY+0.68;
text="";
};
class TEXT_CENTER_LINE_1_RIGHT: TEXT_CENTER_LINE_1_LEFT
{
idc=74303;
style=ST_RIGHT;
};
class TEXT_CENTER_LINE2_RIGHT: TEXT_CENTER_LINE2_LEFT
{
idc=74304;
style=ST_RIGHT;
};
class TEXT_CENTER_LINE_3_RIGHT: TEXT_CENTER_LINE_3_LEFT
{
idc=74305;
style=ST_RIGHT;
};
class TEXT_INFO_LINE_1: TEXT_TOP
{
idc=74400;
y=safezoneY+0.69;
text="";
};
class TEXT_INFO_LINE_2: TEXT_TOP
{
idc=74401;
y=safezoneY+0.72;
text="";
};
};
};
class POWER: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.385;
y=safezoneY+1.125;
w=0.042;
h=0.042*4/3;
action="closeDialog 0";
onMouseButtonDown = "playSound 'kestrel4500_exit_button_click'";
};
class ENTER: POWER
{
idc=-1;
x=safezoneX+0.46;
y=safezoneY+1.0;
w=0.1;
action=QUOTE(0 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_center_button_click'";
};
class TOP: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.46;
y=safezoneY+0.93;
w=0.1;
h=0.03;
action=QUOTE(1 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_top_button_click'";
};
class BOTTOM: TOP
{
idc=-1;
y=safezoneY+1.1;
action=QUOTE(2 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_bottom_button_click'";
};
class LEFT: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.4;
y=safezoneY+0.97;
w=0.046;
h=0.11;
action=QUOTE(3 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_left_button_click'";
};
class RIGHT: LEFT
{
idc=-1;
x=safezoneX+0.58;
action=QUOTE(4 call FUNC(buttonPressed));
onMouseButtonDown = "playSound 'kestrel4500_right_button_click'";
};
class MEMORY: Kestrel4500_RscButton
{
idc=-1;
x=safezoneX+0.395;
y=safezoneY+0.87;
w=0.05;
h=0.045*4/3;
action=QUOTE(5 call FUNC(buttonPressed));
};
class BACKLIGHT: MEMORY
{
idc=-1;
x=safezoneX+0.585;
action=QUOTE(6 call FUNC(buttonPressed));
};
class TEXT_TOP: Kestrel4500_RscText
{
idc=74100;
x=safezoneX+0.40;
y=safezoneY+0.58;
w=0.22;
h=0.04;
text="";
};
class TEXT_CENTER_BIG: TEXT_TOP
{
idc=74200;
y=safezoneY+0.61;
h=0.10;
SizeEx=0.06;
text="";
};
class TEXT_CENTER_LINE_1_LEFT: TEXT_TOP
{
idc=74300;
y=safezoneY+0.60;
style=ST_LEFT;
h=0.10;
SizeEx=0.05;
text="";
};
class TEXT_CENTER_LINE2_LEFT: TEXT_CENTER_LINE_1_LEFT
{
idc=74301;
y=safezoneY+0.64;
text="";
};
class TEXT_CENTER_LINE_3_LEFT: TEXT_CENTER_LINE2_LEFT
{
idc=74302;
y=safezoneY+0.68;
text="";
};
class TEXT_CENTER_LINE_1_RIGHT: TEXT_CENTER_LINE_1_LEFT
{
idc=74303;
style=ST_RIGHT;
};
class TEXT_CENTER_LINE2_RIGHT: TEXT_CENTER_LINE2_LEFT
{
idc=74304;
style=ST_RIGHT;
};
class TEXT_CENTER_LINE_3_RIGHT: TEXT_CENTER_LINE_3_LEFT
{
idc=74305;
style=ST_RIGHT;
};
class TEXT_INFO_LINE_1: TEXT_TOP
{
idc=74400;
y=safezoneY+0.69;
text="";
};
class TEXT_INFO_LINE_2: TEXT_TOP
{
idc=74401;
y=safezoneY+0.72;
text="";
};
};
};
class RscTitles
{
class RscKestrel4500
{
idd=-1;
onLoad="with uiNameSpace do { RscKestrel4500 = _this select 0 };";
movingEnable=0;
duration=60;
fadeIn="false";
fadeOut="false";
class controls
{
class RscKestrel4500
{
idc=75000;
moving=0;
type=0;
font="TahomaB";
SizeEX=0.025*0.75;
style=48;
x=safezoneX-0.05;
y=safezoneY+0.7;
w=1.024*0.75;
h=1.024*4/3*0.75;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
text=PATHTOF(UI\kestrel4500.paa);
};
class RscTextTop: Kestrel4500_RscText
{
idc=75100;
x=safezoneX-0.05+0.40*0.75;
y=safezoneY+0.7+0.58*0.75;
w=0.22*0.75;
h=0.04*0.75;
SizeEx=0.04*0.75;
text="";
};
class RscTextCenterBig: RscTextTop
{
idc=75200;
y=safezoneY+0.7+0.61*0.75;
h=0.10*0.75;
SizeEx=0.06*0.75;
text="";
};
class RscTextCenterLine1Left: RscTextTop
{
idc=75300;
y=safezoneY+0.7+0.60*0.75;
style=ST_LEFT;
h=0.10*0.75;
SizeEx=0.05*0.75;
text="";
};
class RscTextCenterLine2Left: RscTextCenterLine1Left
{
idc=75301;
y=safezoneY+0.7+0.64*0.75;
text="";
};
class RscTextCenterLine3Left: RscTextCenterLine2Left
{
idc=75302;
y=safezoneY+0.7+0.68*0.75;
text="";
};
class RscTextCenterLine1Right: RscTextCenterLine1Left
{
idc=75303;
style=ST_RIGHT;
};
class RscTextCenterLine2Right: RscTextCenterLine2Left
{
idc=75304;
style=ST_RIGHT;
};
class RscTextCenterLine3Right: RscTextCenterLine3Left
{
idc=75305;
style=ST_RIGHT;
};
class RscTextInfoLine1: RscTextTop
{
idc=75400;
y=safezoneY+0.7+0.69*0.75;
text="";
};
class RscTextInfoLine2: RscTextTop
{
idc=75401;
y=safezoneY+0.7+0.72*0.75;
text="";
};
};
};
class RscKestrel4500
{
idd=-1;
onLoad="with uiNameSpace do { RscKestrel4500 = _this select 0 };";
movingEnable=0;
duration=60;
fadeIn="false";
fadeOut="false";
class controls
{
class RscKestrel4500
{
idc=75000;
moving=0;
type=0;
font="TahomaB";
SizeEX=0.025*0.75;
style=48;
x=safezoneX-0.05;
y=safezoneY+0.7;
w=1.024*0.75;
h=1.024*4/3*0.75;
colorBackground[]={1,1,1,1};
colorText[]={1,1,1,1};
text=PATHTOF(UI\kestrel4500.paa);
};
class RscTextTop: Kestrel4500_RscText
{
idc=75100;
x=safezoneX-0.05+0.40*0.75;
y=safezoneY+0.7+0.58*0.75;
w=0.22*0.75;
h=0.04*0.75;
SizeEx=0.04*0.75;
text="";
};
class RscTextCenterBig: RscTextTop
{
idc=75200;
y=safezoneY+0.7+0.61*0.75;
h=0.10*0.75;
SizeEx=0.06*0.75;
text="";
};
class RscTextCenterLine1Left: RscTextTop
{
idc=75300;
y=safezoneY+0.7+0.60*0.75;
style=ST_LEFT;
h=0.10*0.75;
SizeEx=0.05*0.75;
text="";
};
class RscTextCenterLine2Left: RscTextCenterLine1Left
{
idc=75301;
y=safezoneY+0.7+0.64*0.75;
text="";
};
class RscTextCenterLine3Left: RscTextCenterLine2Left
{
idc=75302;
y=safezoneY+0.7+0.68*0.75;
text="";
};
class RscTextCenterLine1Right: RscTextCenterLine1Left
{
idc=75303;
style=ST_RIGHT;
};
class RscTextCenterLine2Right: RscTextCenterLine2Left
{
idc=75304;
style=ST_RIGHT;
};
class RscTextCenterLine3Right: RscTextCenterLine3Left
{
idc=75305;
style=ST_RIGHT;
};
class RscTextInfoLine1: RscTextTop
{
idc=75400;
y=safezoneY+0.7+0.69*0.75;
text="";
};
class RscTextInfoLine2: RscTextTop
{
idc=75401;
y=safezoneY+0.7+0.72*0.75;
text="";
};
};
};
};

View File

@ -16,38 +16,38 @@
#include "script_component.hpp"
switch (_this) do {
case 0: { // Enter
if (!GVAR(Kestrel4500_MinAvgMAx) && (GVAR(Kestrel4500_Menu) == 2 || GVAR(Kestrel4500_Menu) == 3)) then {
GVAR(Kestrel4500_RefHeading) = getDir ACE_player;
};
if (GVAR(Kestrel4500_MinAvgMAx) && GVAR(Kestrel4500_Menu) > 0 && GVAR(Kestrel4500_Menu) < 4) then {
if (GVAR(Kestrel4500_MinAvgMAxMode) != 1) then {
{
GVAR(Kestrel4500_MIN) set [_x, 0];
GVAR(Kestrel4500_MAX) set [_x, 0];
GVAR(Kestrel4500_TOTAL) set [_x, 0];
GVAR(Kestrel4500_ENTRIES) set [_x, 0];
} forEach [1, 2, 3];
};
GVAR(Kestrel4500_MinAvgMaxMode) = GVAR(Kestrel4500_MinAvgMaxMode + 1) % 3;
};
};
case 1: { // Top
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) - 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
};
case 2: { // Bottom
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) + 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
};
case 3: { // Left
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
};
case 4: { // Right
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
};
case 5: { // Memory
};
case 6: { // Backlight
};
case 0: { // Enter
if (!GVAR(Kestrel4500_MinAvgMAx) && (GVAR(Kestrel4500_Menu) == 2 || GVAR(Kestrel4500_Menu) == 3)) then {
GVAR(Kestrel4500_RefHeading) = getDir ACE_player;
};
if (GVAR(Kestrel4500_MinAvgMAx) && GVAR(Kestrel4500_Menu) > 0 && GVAR(Kestrel4500_Menu) < 4) then {
if (GVAR(Kestrel4500_MinAvgMAxMode) != 1) then {
{
GVAR(Kestrel4500_MIN) set [_x, 0];
GVAR(Kestrel4500_MAX) set [_x, 0];
GVAR(Kestrel4500_TOTAL) set [_x, 0];
GVAR(Kestrel4500_ENTRIES) set [_x, 0];
} forEach [1, 2, 3];
};
GVAR(Kestrel4500_MinAvgMaxMode) = GVAR(Kestrel4500_MinAvgMaxMode + 1) % 3;
};
};
case 1: { // Top
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) - 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
};
case 2: { // Bottom
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) + 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
};
case 3: { // Left
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
};
case 4: { // Right
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
};
case 5: { // Memory
};
case 6: { // Backlight
};
};
[] call FUNC(updateDisplay);

View File

@ -22,14 +22,14 @@ if (isNil QUOTE(EGVAR(advanced_ballistics,Altitude))) then {EGVAR(advanced_balli
if (isNil QUOTE(GVAR(Kestrel4500_MIN)) || isNil QUOTE(GVAR(Kestrel4500_MAX))) then {
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2);
_humidity = EGVAR(weather,currentHumidity);
_barometricPressure = 1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast;
_altitude = EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2);
GVAR(Kestrel4500_MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
GVAR(Kestrel4500_MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
_barometricPressure = 1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast;
_altitude = EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2);
GVAR(Kestrel4500_MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
GVAR(Kestrel4500_MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
};
{
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
} forEach [0, 4, 5, 6 ,7];
// Direction
@ -39,34 +39,34 @@ GVAR(Kestrel4500_MAX) set [0, _playerDir max (GVAR(Kestrel4500_MAX) select 0)];
GVAR(Kestrel4500_TOTAL) set [0, (GVAR(Kestrel4500_TOTAL) select 0) + _playerDir];
if (GVAR(Kestrel4500_MinAvgMaxMode) == 1) then {
{
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
} forEach [1, 2, 3];
// Wind SPD
_windSpeed = vectorMagnitude ACE_wind;
_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1);
{
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
} forEach [1, 2, 3];
// Wind SPD
_windSpeed = vectorMagnitude ACE_wind;
_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1);
if (isClass (configFile >> "CfgPatches" >> "ACE_Advanced_Ballistics")) then {
_windSpeed = (eyePos ACE_player) call EFUNC(advanced_ballistics,calculateWindSpeed);
};
if (isClass (configFile >> "CfgPatches" >> "ACE_Advanced_Ballistics")) then {
_windSpeed = (eyePos ACE_player) call EFUNC(advanced_ballistics,calculateWindSpeed);
};
_windSpeed = cos(_playerDir - _windDir) * _windSpeed;
GVAR(Kestrel4500_MIN) set [1, (GVAR(Kestrel4500_MIN) select 1) min abs(_windSpeed)];
GVAR(Kestrel4500_MAX) set [1, abs(_windSpeed) max (GVAR(Kestrel4500_MAX) select 1)];
GVAR(Kestrel4500_TOTAL) set [1, (GVAR(Kestrel4500_TOTAL) select 1) + abs(_windSpeed)];
_windSpeed = cos(_playerDir - _windDir) * _windSpeed;
GVAR(Kestrel4500_MIN) set [1, (GVAR(Kestrel4500_MIN) select 1) min abs(_windSpeed)];
GVAR(Kestrel4500_MAX) set [1, abs(_windSpeed) max (GVAR(Kestrel4500_MAX) select 1)];
GVAR(Kestrel4500_TOTAL) set [1, (GVAR(Kestrel4500_TOTAL) select 1) + abs(_windSpeed)];
// CROSSWIND
_crosswind = abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
GVAR(Kestrel4500_MIN) set [2, (GVAR(Kestrel4500_MIN) select 2) min _crosswind];
GVAR(Kestrel4500_MAX) set [2, _crosswind max (GVAR(Kestrel4500_MAX) select 2)];
GVAR(Kestrel4500_TOTAL) set [2, (GVAR(Kestrel4500_TOTAL) select 2) + _crosswind];
// CROSSWIND
_crosswind = abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
GVAR(Kestrel4500_MIN) set [2, (GVAR(Kestrel4500_MIN) select 2) min _crosswind];
GVAR(Kestrel4500_MAX) set [2, _crosswind max (GVAR(Kestrel4500_MAX) select 2)];
GVAR(Kestrel4500_TOTAL) set [2, (GVAR(Kestrel4500_TOTAL) select 2) + _crosswind];
// HEADWIND
_headwind = abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
GVAR(Kestrel4500_MIN) set [3, (GVAR(Kestrel4500_MIN) select 3) min _headwind];
GVAR(Kestrel4500_MAX) set [3, _headwind max (GVAR(Kestrel4500_MAX) select 3)];
GVAR(Kestrel4500_TOTAL) set [3, (GVAR(Kestrel4500_TOTAL) select 3) + _headwind];
// HEADWIND
_headwind = abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
GVAR(Kestrel4500_MIN) set [3, (GVAR(Kestrel4500_MIN) select 3) min _headwind];
GVAR(Kestrel4500_MAX) set [3, _headwind max (GVAR(Kestrel4500_MAX) select 3)];
GVAR(Kestrel4500_TOTAL) set [3, (GVAR(Kestrel4500_TOTAL) select 3) + _headwind];
};
// TEMP

View File

@ -30,16 +30,16 @@
private ["_outputData"];
if (GVAR(Kestrel4500_Overlay)) exitWith {
GVAR(Kestrel4500_Overlay) = false;
3 cutText ["", "PLAIN"];
true
GVAR(Kestrel4500_Overlay) = false;
3 cutText ["", "PLAIN"];
true
};
if (underwater ACE_player) exitWith { true };
if (!("ACE_Kestrel4500" in (uniformItems ACE_player)) && !("ACE_Kestrel4500" in (vestItems ACE_player))) exitWith { true };
if (GVAR(Kestrel4500) && dialog) then {
GVAR(Kestrel4500) = false;
closeDialog 0;
GVAR(Kestrel4500) = false;
closeDialog 0;
};
GVAR(Kestrel4500_Overlay) = true;

View File

@ -55,161 +55,161 @@ if (_playerDir % 90 > 80) then { GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_
GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) % 16;
switch (GVAR(Kestrel4500_Menu)) do {
case 0: { // Direction
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = format["%1", format["%1 %2", GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction), round(_playerDir)]];
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = "N/A";
_textCenterLine2Right = "N/A";
_textCenterLine3Right = "N/A";
};
};
case 1: { // Wind SPD
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(_windSpeed) * 10) / 10);
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMaxMode)) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 1) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 1) / (Kestrel4500_ENTRIES select 1) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 1) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 1) / (Kestrel4500_ENTRIES select 1) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 2: { // CROSSWIND
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
_textInfoLine2 = "- set heading";
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 2) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 2) / (Kestrel4500_ENTRIES select 2) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 2) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 2) / (Kestrel4500_ENTRIES select 2) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 3: { // HEADWIND
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
_textInfoLine2 = "- set heading";
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 3) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 3) / (Kestrel4500_ENTRIES select 3) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 3) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 3) / (Kestrel4500_ENTRIES select 3) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 4: { // TEMP
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(_temperature * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 4) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 4) / (Kestrel4500_ENTRIES select 4) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 4) * 10) / 10);
};
};
case 5: { // HUMIDITY
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(_humidity * 100 * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 5) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 5) / (Kestrel4500_ENTRIES select 5) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 5) * 10) / 10);
};
};
case 6: { // BARO
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 6) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 6) / (Kestrel4500_ENTRIES select 6) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 6) * 10) / 10);
};
};
case 7: { // ALTITUDE
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round(Kestrel4500_MIN select 7));
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 7) / (Kestrel4500_ENTRIES select 7)));
_textCenterLine3Right = Str(round(Kestrel4500_MAX select 7));
};
};
case 8: { // User Screen 1
_textCenterLine1Left = Str(round(_playerDir));
_textCenterLine2Left = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
_textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10);
_textCenterLine1Right = GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction);
_textCenterLine2Right = "m";
_textCenterLine3Right = "m/s";
};
case 9: { // User Screen 2
_textCenterLine1Left = Str(round(_temperature * 10) / 10);
_textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10);
_textCenterLine3Left = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10);
_textCenterLine1Right = "C";
_textCenterLine2Right = "%";
_textCenterLine3Right = "hPA";
};
case 0: { // Direction
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = format["%1", format["%1 %2", GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction), round(_playerDir)]];
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = "N/A";
_textCenterLine2Right = "N/A";
_textCenterLine3Right = "N/A";
};
};
case 1: { // Wind SPD
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(_windSpeed) * 10) / 10);
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMaxMode)) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 1) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 1) / (Kestrel4500_ENTRIES select 1) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 1) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 1) / (Kestrel4500_ENTRIES select 1) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 2: { // CROSSWIND
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
_textInfoLine2 = "- set heading";
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 2) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 2) / (Kestrel4500_ENTRIES select 2) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 2) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 2) / (Kestrel4500_ENTRIES select 2) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 3: { // HEADWIND
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
_textInfoLine2 = "- set heading";
} else {
_textCenterLine1Left = "Max";
_textCenterLine2Left = "Avg";
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
case 0: {
_textCenterLine1Right = "--. -";
_textCenterLine2Right = "--. -";
_textInfoLine2 = "- average";
};
case 1: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 3) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 3) / (Kestrel4500_ENTRIES select 3) * 10) / 10);
_textInfoLine2 = "- stop";
};
case 2: {
_textCenterLine1Right = Str(round((Kestrel4500_MAX select 3) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 3) / (Kestrel4500_ENTRIES select 3) * 10) / 10);
_textInfoLine2 = "- clear";
};
};
};
};
case 4: { // TEMP
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(_temperature * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 4) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 4) / (Kestrel4500_ENTRIES select 4) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 4) * 10) / 10);
};
};
case 5: { // HUMIDITY
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(_humidity * 100 * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 5) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 5) / (Kestrel4500_ENTRIES select 5) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 5) * 10) / 10);
};
};
case 6: { // BARO
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10);
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round((Kestrel4500_MIN select 6) * 10) / 10);
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 6) / (Kestrel4500_ENTRIES select 6) * 10) / 10);
_textCenterLine3Right = Str(round((Kestrel4500_MAX select 6) * 10) / 10);
};
};
case 7: { // ALTITUDE
if (!GVAR(Kestrel4500_MinAvgMax)) then {
_textCenterBig = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
} else {
_textCenterLine1Left = "Min";
_textCenterLine2Left = "Avg";
_textCenterLine3Left = "Max";
_textCenterLine1Right = Str(round(Kestrel4500_MIN select 7));
_textCenterLine2Right = Str(round((Kestrel4500_TOTAL select 7) / (Kestrel4500_ENTRIES select 7)));
_textCenterLine3Right = Str(round(Kestrel4500_MAX select 7));
};
};
case 8: { // User Screen 1
_textCenterLine1Left = Str(round(_playerDir));
_textCenterLine2Left = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
_textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10);
_textCenterLine1Right = GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction);
_textCenterLine2Right = "m";
_textCenterLine3Right = "m/s";
};
case 9: { // User Screen 2
_textCenterLine1Left = Str(round(_temperature * 10) / 10);
_textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10);
_textCenterLine3Left = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10);
_textCenterLine1Right = "C";
_textCenterLine2Right = "%";
_textCenterLine3Right = "hPA";
};
};
[_textTop, _textCenterBig, _textCenterLine1Left, _textCenterLine2Left, _textCenterLine3Left, _textCenterLine1Right, _textCenterLine2Right, _textCenterLine3Right, _textInfoLine1, _textInfoLine2]

View File

@ -2,11 +2,11 @@
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_KESTREL4500
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_KESTREL4500
#define DEBUG_SETTINGS DEBUG_SETTINGS_KESTREL4500
#define DEBUG_SETTINGS DEBUG_SETTINGS_KESTREL4500
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project name="ACE">
<Package name="Kestrel4500">
<Package name="Kestrel4500">
<Key ID="STR_ACE_Kestrel_Name">
<English>Kestrel 4500NV</English>
<German>Kestrel 4500NV</German>
@ -31,5 +31,5 @@
<Key ID="STR_ACE_Kestrel4500_DisplayKestrelKey">
<English>Show Kestrel 4500</English>
</Key>
</Package>
</Package>
</Project>