Skip to content

Commit

Permalink
Tools - Add script to update HEMTT include folder (#8134)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Apr 20, 2021
1 parent 5aa6e56 commit 28cad69
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 22 deletions.
Binary file modified include/a3/data_f/penetration/metal_plate_thin.rvmat
Binary file not shown.
9 changes: 8 additions & 1 deletion include/a3/ui_f/hpp/defineCommonColors.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions include/a3/ui_f/hpp/defineDIKCodes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,4 @@


#endif /* DIK_ESCAPE */

6 changes: 6 additions & 0 deletions include/a3/ui_f/hpp/defineResincl.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef _RESINCL_HPP
#define _RESINCL_HPP

/*******************/
/* Tactical menu */
/*******************/
Expand Down Expand Up @@ -3168,3 +3171,6 @@ enum
#define HZ_VEH_CMDTRRT_TOTAL 31

#define HZ_TANK_BOTH_TRACKS 32


#endif
25 changes: 6 additions & 19 deletions include/x/cba/addons/main/script_macros_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Macro: LOG()
------------------------------------------- */
#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))
Expand Down Expand Up @@ -265,7 +265,7 @@ Macro: WARNING()
------------------------------------------- */
#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))
Expand Down Expand Up @@ -304,7 +304,7 @@ Macro: ERROR()
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))
Expand Down Expand Up @@ -1812,9 +1812,9 @@ Macro: IS_ADMIN_LOGGED

/* -------------------------------------------
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
Expand All @@ -1828,17 +1828,4 @@ Macro: FILE_EXISTS
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))
8 changes: 6 additions & 2 deletions include/x/cba/addons/xeh/script_xeh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -107,4 +109,6 @@ reloaded = ""; \
firedMan = ""; \
turnIn = ""; \
turnOut = ""; \
deleted = "";
deleted = ""; \
disassembled = ""; \
Suppressed = "";
21 changes: 21 additions & 0 deletions tools/updateIncludes.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 28cad69

Please sign in to comment.