summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorMalkierian <malkierian@live.com>2023-05-28 15:40:53 -0700
committerGitHub <noreply@github.com>2023-05-28 18:40:53 -0400
commit0c7e80a190c16bc049a438e851e356ec04c06b33 (patch)
treedb2a77b282267e9e528074b8b5a377da15a47a26 /soh/src/code
parentcebfcd1d88ab04d1c1be80608dd4c724ffc88113 (diff)
Improve Controller LED Control (#2864)
* Add brightness control and on/off toggle for tunic LED colors. * Removed toggle, mentioned brightness of 0% for turning off LEDs. * Set up grabbing tunic color values from Cosmetics Editor for cosmetics sync. * Why these stupid differences between Windows and Linux compilers? * Fix Mac build errors? Also try to move the color fetching back into the switch statements to lessen potential computational load. * Real fix? * Move "Customize Game Controls" button under "Controller Configuration" button under Settings -> Controller. Renamed "Controller Configuration" to "Configure Controller" and "Customize Game Controls" to "Customize In-game Controls" * Added LEDColor and LEDColorSource enums for code clarity. Moved controller LED brightness to new LED Colors group in "Customize In-game Controls" menu. Added combobox to choose between vanilla tunics, cosmetics tunics, health, and custom as color sources. Added critical health override checkbox to allow display of red when health is low even when other sources are selected. Port color pickers have not been implemented yet, default color is white. * Moved LED control to OTRControllerCallback and wrapped it in a check to `CanSetLed()`. * Move settings to Port 1 tab in Customize In-game Controls and limited application of colors in `OTRControllerCallback` to port 1. * UI clarity updates. * Removed unnecessary LED color enum. Added custom color picker to port 1 color settings. * Changed Critical Health Override default to true. * Modified logic to not do color fetching and instead default to {0,0,0,0} when brightness is off. * Fix bad cvar string for custom color. * Cleaning up some post-merge artifacts. * Update soh/soh/Enhancements/controls/GameControlEditor.h Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Some name changes. * idea for cleaning up controller callback stuff * Rearranged color source checks to make sure criticalOverride is applied regardless of other settings. --------- Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> Co-authored-by: briaguya <briaguya@alice>
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/padmgr.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/soh/src/code/padmgr.c b/soh/src/code/padmgr.c
index ac0bfc2c6..d98d23e4a 100644
--- a/soh/src/code/padmgr.c
+++ b/soh/src/code/padmgr.c
@@ -295,25 +295,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
}
uint8_t rumble = (padMgr->rumbleEnable[0] > 0);
- uint8_t ledColor = 1;
-
- if (HealthMeter_IsCritical()) {
- ledColor = 0;
- } else if (gPlayState) {
- switch (CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1) {
- case PLAYER_TUNIC_KOKIRI:
- ledColor = 1;
- break;
- case PLAYER_TUNIC_GORON:
- ledColor = 2;
- break;
- case PLAYER_TUNIC_ZORA:
- ledColor = 3;
- break;
- }
- }
-
- OTRControllerCallback(rumble, ledColor);
+ OTRControllerCallback(rumble);
if (CVarGetInteger("gPauseBufferBlockInputFrame", 0)) {
Controller_BlockGameInput();