Merge pull request #326 from KoffeinFlummi/VectorFOSfix

Fix for Vector Fall-of-Shot display
This commit is contained in:
commy2 2015-04-06 16:20:13 +02:00
commit 796a430292
7 changed files with 82 additions and 82 deletions

View File

@ -18,7 +18,7 @@ PREP(getHeightDistance);
PREP(getRelativeAzimuthDistance);
PREP(getRelativeDistance);
PREP(getRelativeHeightLength);
PREP(getFallOfShort);
PREP(getFallOfShot);
PREP(showAzimuth);
PREP(showAzimuthInclination);
PREP(showHeightDistance);
@ -26,7 +26,7 @@ PREP(showDistance);
PREP(showRelativeAzimuthDistance);
PREP(showRelativeDistance);
PREP(showRelativeHeightLength);
PREP(showFallOfShort);
PREP(showFallOfShot);
PREP(showText);
PREP(nextMode);
PREP(adjustBrightness);

View File

@ -30,75 +30,6 @@ _digit4 = _number mod 10;
switch (_coordinate) do {
case 0 : {
if (_isNegative) then {
if (_digit1 == 0) then {
if (_digit2 == 0) then {
if (_digit3 == 0) then {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit3 = "";
_digit4 = "";
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit4 = "";
};
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
};
} else {
_digit0 = "";
_digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa));
};
} else {
if (_digit1 == 0) then {
if (_digit2 == 0) then {
if (_digit3 == 0) then {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit3 = "";
_digit4 = "";
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit4 = "";
};
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
};
} else {
_digit0 = "";
_digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa));
};
};
};
case 1 : {
if (_isNegative) then {
if (_digit1 == 0) then {
@ -166,6 +97,75 @@ switch (_coordinate) do {
};
case 1 : {
if (_isNegative) then {
if (_digit1 == 0) then {
if (_digit2 == 0) then {
if (_digit3 == 0) then {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit3 = "";
_digit4 = "";
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit4 = "";
};
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_d.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
};
} else {
_digit0 = "";
_digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa));
};
} else {
if (_digit1 == 0) then {
if (_digit2 == 0) then {
if (_digit3 == 0) then {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit3 = "";
_digit4 = "";
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
_digit4 = "";
};
} else {
_digit0 = QUOTE(PATHTOF(rsc\vector_a.paa));
_digit1 = "";
_digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2];
_digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3];
_digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4];
};
} else {
_digit0 = "";
_digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa));
_digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa));
};
};
};
case 2 : {
if (_isNegative) then {

View File

@ -128,11 +128,11 @@ switch (_this select 0) do {
};
// prevent additinal modifier input if advanced mode it set, spaghetti
if (GETGVAR(isKeyDownAzimuth,false) && {GETGVAR(currentMode,"") in ["relative_azimuth+distance", "fall_of_short"]}) exitWith {};
if (GETGVAR(isKeyDownAzimuth,false) && {GETGVAR(currentMode,"") in ["relative_azimuth+distance", "fall_of_shot"]}) exitWith {};
// toggle fos values
if (GETGVAR(currentMode,"") == "fall_of_short") exitWith {
[!(GETGVAR(FOSState,true))] call FUNC(showFallOfShort);
if (GETGVAR(currentMode,"") == "fall_of_shot") exitWith {
[!(GETGVAR(FOSState,true))] call FUNC(showFallOfShot);
};
["distance"] call FUNC(clearDisplay);

View File

@ -198,7 +198,7 @@ switch (_this select 0) do {
};
case ("fall_of_short"): {
case ("fall_of_shot"): {
private "_isReady";
_isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5;
@ -207,8 +207,8 @@ switch (_this select 0) do {
if (!GVAR(isKeyDownAzimuth) && {!GVAR(isKeyDownDistance)}) then {
if (_isReady) then {
GVAR(FOSData) = call FUNC(getFallOfShort);//
[false] call FUNC(showFallOfShort);
GVAR(FOSData) = call FUNC(getFallOfShot);
[false] call FUNC(showFallOfShot);
};
[false] call FUNC(showCenter);
[false] call FUNC(showP1);

View File

@ -65,7 +65,7 @@ switch (_this select 0) do {
["distance"] call FUNC(clearDisplay);
[true] call FUNC(showP1);
GVAR(pData) = [call FUNC(getDistance), call FUNC(getDirection)];
"fall_of_short" call _fnc_setPFH;
"fall_of_shot" call _fnc_setPFH;
};
};

View File

@ -15,8 +15,8 @@ _fosData = GVAR(FOSData);
if !(_this select 0) then {
private "_digits";
// of abscissa
_digits = [_fosData, 0] call FUNC(convertToTexturesFOS);
// of ordinate
_digits = [_fosData, 1] call FUNC(convertToTexturesFOS);
(_dlgVector displayCtrl 1310) ctrlSetText (_digits select 0);
(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 1);
@ -24,8 +24,8 @@ if !(_this select 0) then {
(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 3);
(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 4);
// of ordinate
_digits = [_fosData, 1] call FUNC(convertToTexturesFOS);
// of abscissa
_digits = [_fosData, 0] call FUNC(convertToTexturesFOS);
(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0);
(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1);