alias controls on M1/M2 for now

This commit is contained in:
Demur Rumed 2025-04-16 03:19:00 +00:00
commit 2e25f846bc
4 changed files with 11 additions and 4 deletions

View file

@ -1597,7 +1597,6 @@ void SohInputEditorWindow::DrawLinkTab() {
} }
if (ImGui::CollapsingHeader("Modifier Buttons")) { if (ImGui::CollapsingHeader("Modifier Buttons")) {
DrawButtonLine("QV", portIndex, BTN_CUSTOM_QUERYVIEW);
DrawButtonLine("M1", portIndex, BTN_CUSTOM_MODIFIER1); DrawButtonLine("M1", portIndex, BTN_CUSTOM_MODIFIER1);
DrawButtonLine("M2", portIndex, BTN_CUSTOM_MODIFIER2); DrawButtonLine("M2", portIndex, BTN_CUSTOM_MODIFIER2);

View file

@ -177,7 +177,17 @@ void RegisterOnInterfaceUpdateHook() {
if (!GameInteractor::IsSaveLoaded(true)) if (!GameInteractor::IsSaveLoaded(true))
return; 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; int minDist = 1000000;
Actor* readOut = NULL; Actor* readOut = NULL;
Player* player = GET_PLAYER(gPlayState); Player* player = GET_PLAYER(gPlayState);

View file

@ -314,7 +314,6 @@ OTRGlobals::OTRGlobals() {
context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets); context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets);
auto controlDeck = std::make_shared<LUS::ControlDeck>(std::vector<CONTROLLERBUTTONS_T>({ auto controlDeck = std::make_shared<LUS::ControlDeck>(std::vector<CONTROLLERBUTTONS_T>({
BTN_CUSTOM_QUERYVIEW,
BTN_CUSTOM_MODIFIER1, BTN_CUSTOM_MODIFIER1,
BTN_CUSTOM_MODIFIER2, BTN_CUSTOM_MODIFIER2,
BTN_CUSTOM_OCARINA_NOTE_D4, BTN_CUSTOM_OCARINA_NOTE_D4,

View file

@ -3,7 +3,6 @@
#pragma once #pragma once
#define BTN_CUSTOM_QUERYVIEW 0x0020
#define BTN_CUSTOM_MODIFIER1 0x0040 #define BTN_CUSTOM_MODIFIER1 0x0040
#define BTN_CUSTOM_MODIFIER2 0x0080 #define BTN_CUSTOM_MODIFIER2 0x0080