From 2e25f846bc86687718410b84c6f1db390a422972 Mon Sep 17 00:00:00 2001 From: Demur Rumed Date: Wed, 16 Apr 2025 03:19:00 +0000 Subject: [PATCH] alias controls on M1/M2 for now --- .../Enhancements/controls/SohInputEditorWindow.cpp | 1 - soh/soh/Enhancements/tts/tts.cpp | 12 +++++++++++- soh/soh/OTRGlobals.cpp | 1 - soh/soh/OTRGlobals.h | 1 - 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp index f6b44ceac..3f77d1ed4 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp @@ -1597,7 +1597,6 @@ void SohInputEditorWindow::DrawLinkTab() { } if (ImGui::CollapsingHeader("Modifier Buttons")) { - DrawButtonLine("QV", portIndex, BTN_CUSTOM_QUERYVIEW); DrawButtonLine("M1", portIndex, BTN_CUSTOM_MODIFIER1); DrawButtonLine("M2", portIndex, BTN_CUSTOM_MODIFIER2); diff --git a/soh/soh/Enhancements/tts/tts.cpp b/soh/soh/Enhancements/tts/tts.cpp index bbfbf91ca..54e3aa079 100644 --- a/soh/soh/Enhancements/tts/tts.cpp +++ b/soh/soh/Enhancements/tts/tts.cpp @@ -177,7 +177,17 @@ void RegisterOnInterfaceUpdateHook() { if (!GameInteractor::IsSaveLoaded(true)) return; - if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_QUERYVIEW)) { + if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_MODIFIER1)) { + Player* player = GET_PLAYER(gPlayState); + if (player != NULL) { + char ttsAnnounceBuf[16]; + int angle = (int)(player->actor.world.rot.y / (65536 / 360.0)); + int annouceBuf = snprintf(ttsAnnounceBuf, sizeof(ttsAnnounceBuf), "facing %d", angle); + SpeechSynthesizer::Instance->Speak(ttsAnnounceBuf, "en-US"); + } + } + + if (CHECK_BTN_ALL(gPlayState->state.input->press.button, BTN_CUSTOM_MODIFIER2)) { int minDist = 1000000; Actor* readOut = NULL; Player* player = GET_PLAYER(gPlayState); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 5bdfa6431..ad4e2be7a 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -314,7 +314,6 @@ OTRGlobals::OTRGlobals() { context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets); auto controlDeck = std::make_shared(std::vector({ - BTN_CUSTOM_QUERYVIEW, BTN_CUSTOM_MODIFIER1, BTN_CUSTOM_MODIFIER2, BTN_CUSTOM_OCARINA_NOTE_D4, diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 96ba7b612..6f83d78ad 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -3,7 +3,6 @@ #pragma once -#define BTN_CUSTOM_QUERYVIEW 0x0020 #define BTN_CUSTOM_MODIFIER1 0x0040 #define BTN_CUSTOM_MODIFIER2 0x0080