From 28cad69947bb4491433730657533604cd12356fe Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 20 Apr 2021 05:28:11 -0500 Subject: [PATCH] Tools - Add script to update HEMTT include folder (#8134) --- .../data_f/penetration/metal_plate_thin.rvmat | Bin 310 -> 293 bytes include/a3/ui_f/hpp/defineCommonColors.inc | 9 ++++++- include/a3/ui_f/hpp/defineDIKCodes.inc | 1 + include/a3/ui_f/hpp/defineResincl.inc | 6 +++++ .../cba/addons/main/script_macros_common.hpp | 25 +++++------------- include/x/cba/addons/xeh/script_xeh.hpp | 8 ++++-- tools/updateIncludes.py | 21 +++++++++++++++ 7 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 tools/updateIncludes.py diff --git a/include/a3/data_f/penetration/metal_plate_thin.rvmat b/include/a3/data_f/penetration/metal_plate_thin.rvmat index 6027df8d27030a8c6d7f850cbcf39fce89904b82..8d479baa8e463b8307b4c94bbe4fd9f09814598b 100644 GIT binary patch literal 293 zcma)%PYZ%T5XJ9)49_A;kcD_Cym$#A=#n9$&f>uSk=?a~=)1S-p`c4|F2iqT-eb(D z8MIhPrZWGqsXDMwv#LaiR)ZxaD}fexJ#esC+n!|Dka1Uj>VaqorM=#=XB2MttAZ%p zMT=tBCdopRAbzD@M~saI|K4Xxx7g)hS3xwFvqB-r(0%n<=p0}MY)1}yN%*0qdZ5nY g)GKL1e(s?|UF4a6Qd$6a|6EX8oIZmi7-}7V12W%RfB*mh literal 310 zcmZ`#%L>9k49pe}diOg#*bgX*Ac9Ci@Kh+V&0=65lHICDzsN7qe{zfHK{Sv#%w&ck zAXq}0VcMxmFj5dY(b&++X%Dl!YB6H1tCAc=!N}fKmLi(^XfRS859}s;?oE)P-7~oe z1C{4_p&s{jp~kmmk&>@P*0R=Jpg*ei(onm2-(-EQZy;+q@F_)nD}DDY9I5FH%5PbH n^wOV6ptmR}`9fxUz?NjSfQ=W6Ceb^RNS6;k$H2|&L&^07u3bmm diff --git a/include/a3/ui_f/hpp/defineCommonColors.inc b/include/a3/ui_f/hpp/defineCommonColors.inc index 474b732f28..5370c07e6c 100644 --- a/include/a3/ui_f/hpp/defineCommonColors.inc +++ b/include/a3/ui_f/hpp/defineCommonColors.inc @@ -98,6 +98,14 @@ #define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B #define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A} +//--- IGUI Tactical ping color +#define IGUI_TACTPING_RGB_R "(profilenamespace getvariable ['IGUI_TACTPING_RGB_R',1.0])" +#define IGUI_TACTPING_RGB_G "(profilenamespace getvariable ['IGUI_TACTPING_RGB_G',0.8])" +#define IGUI_TACTPING_RGB_B "(profilenamespace getvariable ['IGUI_TACTPING_RGB_B',0.2])" +#define IGUI_TACTPING_RGB_A "(profilenamespace getvariable ['IGUI_TACTPING_RGB_A',1.0])" +#define IGUI_TACTPING_RGB IGUI_TACTPING_RGB_R, IGUI_TACTPING_RGB_G, IGUI_TACTPING_RGB_B +#define IGUI_TACTPING_COLOR {IGUI_TACTPING_RGB,IGUI_TACTPING_RGB_A} + //--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR) #define CA_UI_HUD IGUI_TEXT_COLOR @@ -213,7 +221,6 @@ #define COLOR_TASK_ICON_CUSTOM_A 0.5 #define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A - #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A diff --git a/include/a3/ui_f/hpp/defineDIKCodes.inc b/include/a3/ui_f/hpp/defineDIKCodes.inc index eb914f9482..c641d60132 100644 --- a/include/a3/ui_f/hpp/defineDIKCodes.inc +++ b/include/a3/ui_f/hpp/defineDIKCodes.inc @@ -187,3 +187,4 @@ #endif /* DIK_ESCAPE */ + diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc index 7a94b6b592..ee8ddd5dba 100644 --- a/include/a3/ui_f/hpp/defineResincl.inc +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -1,3 +1,6 @@ +#ifndef _RESINCL_HPP +#define _RESINCL_HPP + /*******************/ /* Tactical menu */ /*******************/ @@ -3168,3 +3171,6 @@ enum #define HZ_VEH_CMDTRRT_TOTAL 31 #define HZ_TANK_BOTH_TRACKS 32 + + +#endif \ No newline at end of file diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index 41a4faea75..d50a27f53d 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -197,7 +197,7 @@ Author: ------------------------------------------- */ #ifdef DEBUG_MODE_FULL -#define LOG(MESSAGE) LOG_SYS_FILELINENUMBERS('LOG',MESSAGE) +#define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE) #define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1)) #define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2)) #define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -265,7 +265,7 @@ Author: ------------------------------------------- */ #ifdef DEBUG_MODE_NORMAL -#define WARNING(MESSAGE) LOG_SYS_FILELINENUMBERS('WARNING',MESSAGE) +#define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE) #define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1)) #define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2)) #define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -304,7 +304,7 @@ Example: Author: Spooner ------------------------------------------- */ -#define ERROR(MESSAGE) LOG_SYS_FILELINENUMBERS('ERROR',MESSAGE) +#define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE) #define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1)) #define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2)) #define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -1812,9 +1812,9 @@ Author: /* ------------------------------------------- Macro: FILE_EXISTS - Check if a file exists on machines with interface + Check if a file exists - Reports "false" if the file does not exist and throws an error in RPT. + Reports "false" if the file does not exist. Parameters: FILE - Path to the file @@ -1828,17 +1828,4 @@ Example: Author: commy2 ------------------------------------------- */ -#define FILE_EXISTS(FILE) (call {\ - private _return = false;\ - isNil {\ - private _control = (uiNamespace getVariable ["RscDisplayMain", displayNull]) ctrlCreate ["RscHTML", -1];\ - if (isNull _control) then {\ - _return = loadFile (FILE) != "";\ - } else {\ - _control htmlLoad (FILE);\ - _return = ctrlHTMLLoaded _control;\ - ctrlDelete _control;\ - };\ - };\ - _return\ -}) +#define FILE_EXISTS(FILE) (fileExists (FILE)) diff --git a/include/x/cba/addons/xeh/script_xeh.hpp b/include/x/cba/addons/xeh/script_xeh.hpp index 6fe7465203..53d6c27859 100644 --- a/include/x/cba/addons/xeh/script_xeh.hpp +++ b/include/x/cba/addons/xeh/script_xeh.hpp @@ -54,7 +54,9 @@ reloaded = "call cba_xeh_fnc_reloaded"; \ firedMan = "call cba_xeh_fnc_firedMan"; \ turnIn = "call cba_xeh_fnc_turnIn"; \ turnOut = "call cba_xeh_fnc_turnOut"; \ -deleted = "call cba_xeh_fnc_deleted"; +deleted = "call cba_xeh_fnc_deleted"; \ +disassembled = "call cba_xeh_fnc_disassembled"; \ +Suppressed = "call cba_xeh_fnc_Suppressed"; /* MACRO: DELETE_EVENTHANDLERS @@ -107,4 +109,6 @@ reloaded = ""; \ firedMan = ""; \ turnIn = ""; \ turnOut = ""; \ -deleted = ""; +deleted = ""; \ +disassembled = ""; \ +Suppressed = ""; diff --git a/tools/updateIncludes.py b/tools/updateIncludes.py new file mode 100644 index 0000000000..721b6b363d --- /dev/null +++ b/tools/updateIncludes.py @@ -0,0 +1,21 @@ +# PabstMirror - Overwrites all files in /include with updated version from a p-drive + +import os +import shutil + +include_base_path = os.path.join(os.path.dirname(os.getcwd()), "include") +p_drive_path = "P:\\" + +if not os.path.exists(p_drive_path): + raise Exception("No P-drive") + +for root, _dirs, files in os.walk(include_base_path): + relative_path = os.path.relpath(root, include_base_path) + for file in files: + if file == "$PBOPREFIX$": + continue + file_r_path = os.path.join(include_base_path, relative_path, file) + file_v_path = os.path.join(p_drive_path, relative_path, file) + if not os.path.isfile(file_v_path): + raise Exception("Missing p-drive file {}".format(file_v_path)) + shutil.copyfile(file_v_path, file_r_path)