ACE3/addons/medical_feedback/script_component.hpp
10Dozen b30f023c04
Adds Icon option for Low blood volume at Medical Feedback (#7507)
* Adds Icon option for Low blood volume at Medical Feedback

- Adds setting to switch Low blood volume effect with 3 options: Color fading, Icon, Color fading + Icon
- Adds icon to UI on low blood
- Adds icon PAA files

* Review fixes

- Added ACE tags to added controls
- Added defines for GUI position/size
- Added missing newline at EOF
- Updated fnc_effectBloodVolumeIcon (removed usage of uiNamespace and minor changes)
- CBA_fnc_addSetting is now used to init settings
- Icon path macro updated to return formatted path

* Review fixes vol.2

- Removed `disableSerialization` and added default value for indicator control and not null checks to effectBVI function
- Removed defines from RscInGameUI and used a3 defines instead
- Changed formatting of macroses

* Review fixes vol.3

- Fixed exec code of BV setting
- Removed ctrlCommit from eBVI function
- Changed initEffects function to be able to update pain and BV effects only
- Changed control name from `BloodVolumeInfoIndicator` to `bloodVolumeIndicator`
- Various formatting tweaks (spaces/lines/uppercase/periods)

* Review fixed vol.4

- Remove extra checks from eBVI func
- Restores contol's onLoad script using ARR_2(QQGVAR())
2020-02-22 14:42:59 -06:00

58 lines
1.9 KiB
C++

#define COMPONENT medical_feedback
#define COMPONENT_BEAUTIFIED Medical Feedback
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MEDICAL_FEEDBACK
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MEDICAL_FEEDBACK
#define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL_FEEDBACK
#endif
#include "\a3\ui_f\hpp\defineCommonGrids.inc"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
#include "\z\ace\addons\main\script_macros.hpp"
#define EMPTY_SOUND {"A3\Sounds_F\dummysound.wss",1,1}
#define NAMESPACE_NULL locationNull
#define DISABLE_VANILLA_SCREAMS
#define DISABLE_VANILLA_MOANS
#define DISABLE_VANILLA_HEARTBEAT
#define DISABLE_VANILLA_BLOOD_TEXTURES
#define DISABLE_VANILLA_DAMAGE_EFFECTS
#define FX_PAIN_FADE_IN 0.3
#define FX_PAIN_FADE_OUT 0.7
#define FX_UNCON_FADE_IN 2.0
#define FX_UNCON_FADE_OUT 5.0
#define SND_HEARBEAT_FAST (selectRandom ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"])
#define SND_HEARBEAT_NORMAL (selectRandom ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"])
#define SND_HEARBEAT_SLOW (selectRandom ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"])
#define SND_FRACTURE (selectRandom ["ACE_fracture_1", "ACE_fracture_2", "ACE_fracture_3", "ACE_fracture_4"])
#define VOL_UNCONSCIOUS 0.25
#define FX_PAIN_WHITE_FLASH 0
#define FX_PAIN_PULSATING_BLUR 1
#define FX_PAIN_CHROMATIC_ABERRATION 2
#define FX_PAIN_ONLY_BASE 3
#define FX_BLOODVOLUME_COLOR_CORRECTION 0
#define FX_BLOODVOLUME_ICON 1
#define FX_BLOODVOLUME_BOTH 2
#define ICON_BLOODVOLUME_IDX_MIN 0
#define ICON_BLOODVOLUME_IDX_MAX 6
#define ICON_BLOODVOLUME_PATH(num) format [QPATHTOF(data\bloodVolume_%1.paa), num]
#define ICON_BLOODVOLUME_COLOR_NONE [0, 0, 0, 0]
#define ICON_BLOODVOLUME_COLOR_WHITE [1, 1, 1, 1]
#define ICON_BLOODVOLUME_COLOR_ORANGE [1, 0.6, 0, 1]
#define ICON_BLOODVOLUME_COLOR_RED [0.8, 0.2, 0, 1]