Change configs to enclose strings for calculations

This commit is contained in:
Bailey 2023-01-20 18:55:00 -07:00
parent abef4fd8ad
commit 0957a3356f
4 changed files with 118 additions and 93 deletions

View File

@ -22,14 +22,14 @@ class CfgMagazines {
author = "Dani (TCVM)";
displayName = CSTRING(a_1x);
ammo = QGVAR(a);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_1Rnd_a): PylonMissile_1Rnd_GAA_missiles {
author = "Dani (TCVM)";
displayName = CSTRING(a_1x);
ammo = QGVAR(a);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
// AIM-120
@ -42,44 +42,44 @@ class CfgMagazines {
author = "Dani (TCVM)";
displayName = CSTRING(c_1x);
ammo = QGVAR(c);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_c_x1): PylonRack_Missile_AMRAAM_C_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(c_1x);
ammo = QGVAR(c);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_c_x2): PylonRack_Missile_AMRAAM_C_x2 {
author = "Dani (TCVM)";
displayName = CSTRING(c_2x);
ammo = QGVAR(c);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_Missile_d_x1): PylonMissile_Missile_AMRAAM_D_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonMissile_Missile_d_INT_x1): PylonMissile_Missile_AMRAAM_D_INT_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_d_x1): PylonRack_Missile_AMRAAM_D_x1 {
author = "Dani (TCVM)";
displayName = CSTRING(d_1x);
ammo = QGVAR(d);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
class GVAR(PylonRack_Missile_d_x2): PylonRack_Missile_AMRAAM_D_x2 {
author = "Dani (TCVM)";
displayName = CSTRING(d_2x);
ammo = QGVAR(d);
pylonWeapon = GVAR(aim120Launcher);
pylonWeapon = QGVAR(aim120Launcher);
};
// R-77

View File

@ -1,5 +1,6 @@
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
#include "\a3\ui_f\hpp\defineCommonColors.inc"
#include "idc_defines.hpp"
class RscText;
class RscEdit;
@ -17,19 +18,19 @@ class GVAR(gpsAttackOptionsUI) {
class Header: RscText {
idc = -1;
text = CSTRING(GPS_ui_header);
x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 18 * GUI_GRID_W;
h = GUI_GRID_H;
x = "13.5 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "18 * GUI_GRID_W";
h = "GUI_GRID_H";
colorBackground[] = GUI_BCG_COLOR;
moving = 1;
};
class Background: RscText {
idd = -1;
x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 6.1 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 18 * GUI_GRID_W;
h = 8.0 * GUI_GRID_H;
x = "13.5 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "6.1 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "18 * GUI_GRID_W";
h = "8.0 * GUI_GRID_H";
colorBackground[] = {0, 0, 0, 0.8};
};
};
@ -38,10 +39,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = GPS_UI_TOO;
text = CSTRING(GPS_ui_too);
onButtonClick = QUOTE([GPS_UI_TOO] call FUNC(gps_modeSelect));
x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 6.3 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 10 * GUI_GRID_W;
h = GUI_GRID_H;
x = "14 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "6.3 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "10 * GUI_GRID_W";
h = "GUI_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = GUI_BCG_COLOR;
colorFocused[] = {0, 0, 0, 0.8};
@ -51,10 +52,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = GPS_UI_PB;
text = CSTRING(GPS_ui_pp);
onButtonClick = QUOTE([GPS_UI_PB] call FUNC(gps_modeSelect));
x = 26 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 6.3 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 5 * GUI_GRID_W;
h = GUI_GRID_H;
x = "26 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "6.3 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "5 * GUI_GRID_W";
h = "GUI_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = GUI_BCG_COLOR;
colorFocused[] = {0, 0, 0, 0.8};
@ -64,10 +65,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = GPS_UI_PB_MISSION;
text = CSTRING(GPS_ui_pp_short);
onButtonClick = "";
x = 27.5 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 2 * GUI_GRID_W;
h = GUI_GRID_H;
x = "27.5 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "2 * GUI_GRID_W";
h = "GUI_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 1};
colorFocused[] = {0, 0, 0, 0.8};
@ -79,10 +80,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = GPS_UI_PB_MISSION_BACKWARD;
text = "<<";
onButtonClick = QUOTE([-1] call FUNC(gps_pbModeCycle));
x = 26 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 1 * GUI_GRID_W;
h = GUI_GRID_H;
x = "26 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "1 * GUI_GRID_W";
h = "GUI_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
colorFocused[] = {0, 0, 0, 0.8};
@ -92,10 +93,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = GPS_UI_PB_MISSION_FORWARD;
text = ">>";
onButtonClick = QUOTE([1] call FUNC(gps_pbModeCycle));
x = 30 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 1 * GUI_GRID_W;
h = GUI_GRID_H;
x = "30 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "7.5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "1 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
colorFocused[] = {0, 0, 0, 0.8};
@ -104,10 +105,10 @@ class GVAR(gpsAttackOptionsUI) {
class TargetPosXText: RscText {
idc = -1;
text = CSTRING(GPS_ui_easting);
x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 8.5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 3 * GUI_GRID_W;
h = GUI_GRID_H;
x = "14 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "8.5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "3 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -116,10 +117,10 @@ class GVAR(gpsAttackOptionsUI) {
class TargetPosX: RscEdit {
idc = GPS_UI_EASTING;
text = "";
x = 17.3 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 8.5 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 2.5 * GUI_GRID_W;
h = GUI_GRID_H;
x = "17.3 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "8.5 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "2.5 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
colorFocused[] = {0, 0, 0, 0.8};
@ -129,10 +130,10 @@ class GVAR(gpsAttackOptionsUI) {
class TargetPosYText: RscText {
idc = -1;
text = CSTRING(GPS_ui_northing);
x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 3 * GUI_GRID_W;
h = GUI_GRID_H;
x = "14 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "3 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -140,17 +141,17 @@ class GVAR(gpsAttackOptionsUI) {
};
class TargetPosY: TargetPosX {
idc = GPS_UI_NORTHING;
x = 17.3 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
x = "17.3 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
};
class TargetPosHeightText: RscText {
idc = -1;
text = CSTRING(GPS_ui_altitude);
x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 3 * GUI_GRID_W;
h = GUI_GRID_H;
x = "14 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "3 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -158,16 +159,16 @@ class GVAR(gpsAttackOptionsUI) {
};
class TargetPosHeight: TargetPosX {
idc = GPS_UI_HEIGHT;
x = 17.3 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
x = "17.3 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
};
class TargetPosHeightUnits: RscText {
idc = -1;
text = "m";
x = 19.6 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 1 * GUI_GRID_W;
h = GUI_GRID_H;
x = "19.6 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "11.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "1 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -177,10 +178,10 @@ class GVAR(gpsAttackOptionsUI) {
class ImpactAngleText: RscText {
idc = -1;
text = CSTRING(GPS_ui_impact_angle);
x = 21 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 4 * GUI_GRID_W;
h = GUI_GRID_H;
x = "21 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "4 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -188,10 +189,10 @@ class GVAR(gpsAttackOptionsUI) {
};
class ImpactAngle: RscEdit {
idc = GPS_UI_ANGLE;
x = 26.3 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 2 * GUI_GRID_W;
h = GUI_GRID_H;
x = "26.3 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "9.7 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "2 * GUI_GRID_W";
h = "GUID_GRID_H";
text = "";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
@ -202,10 +203,10 @@ class GVAR(gpsAttackOptionsUI) {
class AttackHeadingText: RscText {
idc = -1;
text = CSTRING(GPS_ui_attack_heading);
x = 21 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 11 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 5 * GUI_GRID_W;
h = GUI_GRID_H;
x = "21 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "11 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "5 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0.8};
@ -213,10 +214,10 @@ class GVAR(gpsAttackOptionsUI) {
};
class AttackHeading: RscEdit {
idc = GPS_UI_HEADING;
x = 26.3 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 11 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 2 * GUI_GRID_W;
h = GUI_GRID_H;
x = "26.3 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "11 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "2 * GUI_GRID_W";
h = "GUID_GRID_H";
text = "";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
@ -228,10 +229,10 @@ class GVAR(gpsAttackOptionsUI) {
idc = -1;
text = CSTRING(GPS_ui_cancel);
onButtonClick = QUOTE(closeDialog 0);
x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X;
y = 14.2 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 5 * GUI_GRID_W;
h = GUI_GRID_H;
x = "13.5 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = "14.2 * GUI_GRID_H + GUI_GRID_CENTER_Y";
w = "5 * GUI_GRID_W";
h = "GUID_GRID_H";
colorActive[] = {0, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0.8};
colorFocused[] = {0, 0, 0, 0.8};
@ -240,7 +241,7 @@ class GVAR(gpsAttackOptionsUI) {
idc = IDC_TIMER_CONFIRM;
text = CSTRING(GPS_ui_confirm);
onButtonClick = QUOTE([] call FUNC(gps_confirm));
x = 26.5 * GUI_GRID_W + GUI_GRID_CENTER_X;
x = "27.5 * GUI_GRID_W + GUI_GRID_CENTER_X";
};
};
};

View File

@ -0,0 +1,34 @@
#ifndef GPS_UI_TOO
#define GPS_UI_TOO 1704211
#endif
#ifndef GPS_UI_PB
#define GPS_UI_PB 1704112
#endif
#ifndef GPS_UI_PB_MISSION
#define GPS_UI_PB_MISSION 1704113
#endif
#ifndef GPS_UI_PB_MISSION_BACKWARD
#define GPS_UI_PB_MISSION_BACKWARD 1704114
#endif
#ifndef GPS_UI_PB_MISSION_FORWARD
#define GPS_UI_PB_MISSION_FORWARD 1704115
#endif
#ifndef GPS_UI_EASTING
#define GPS_UI_EASTING 1704116
#endif
#ifndef GPS_UI_NORTHING
#define GPS_UI_NORTHING 1704117
#endif
#ifndef GPS_UI_HEIGHT
#define GPS_UI_HEIGHT 1704118
#endif
#ifndef GPS_UI_ANGLE
#define GPS_UI_ANGLE 1704119
#endif
#ifndef GPS_UI_HEADING
#define GPS_UI_HEADING 1704120
#endif
#ifndef IDC_TIMER_CONFIRM
#define IDC_TIMER_CONFIRM 1704121
#endif

View File

@ -34,17 +34,7 @@
#define TERCOM_STATE_FOLLOWING_TERRAIN 1
#define TERCOM_STATE_TERMINAL 2
#define GPS_UI_TOO 1704211
#define GPS_UI_PB 1704112
#define GPS_UI_PB_MISSION 1704113
#define GPS_UI_PB_MISSION_BACKWARD 1704114
#define GPS_UI_PB_MISSION_FORWARD 1704115
#define GPS_UI_EASTING 1704116
#define GPS_UI_NORTHING 1704117
#define GPS_UI_HEIGHT 1704118
#define GPS_UI_ANGLE 1704119
#define GPS_UI_HEADING 1704120
#include "idc_defines.hpp"
#define CONTROLS_DISABLED_IN_TOO [GPS_UI_PB_MISSION_BACKWARD, GPS_UI_PB_MISSION_FORWARD, GPS_UI_EASTING, GPS_UI_NORTHING, GPS_UI_HEIGHT]
#define MAX_PB_MODES 6