mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Fixing rebase conflict
This commit is contained in:
parent
eb9582e866
commit
b1e70ded80
5 changed files with 22 additions and 17 deletions
|
@ -89,6 +89,9 @@ namespace Game {
|
|||
|
||||
Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]);
|
||||
CVar_SetS32("gInputEnabled", Settings.controller.input_enabled);
|
||||
|
||||
Settings.controller.dpad_ocarina_text = stob(Conf[ControllerSection]["dpad_ocarina_text"]);
|
||||
CVar_SetS32("gDpadOcarinaText", Settings.controller.dpad_ocarina_text);
|
||||
|
||||
// Cheats
|
||||
Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]);
|
||||
|
@ -149,6 +152,7 @@ namespace Game {
|
|||
Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength);
|
||||
Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale);
|
||||
Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled);
|
||||
Conf[ControllerSection]["dpad_ocarina_text"] = std::to_string(Settings.controller.dpad_ocarina_text);
|
||||
|
||||
// Cheats
|
||||
Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode);
|
||||
|
|
|
@ -34,6 +34,7 @@ struct SoHConfigType {
|
|||
float gyroDriftX = 0.0f;
|
||||
float gyroDriftY = 0.0f;
|
||||
bool input_enabled = false;
|
||||
bool dpad_ocarina_text = false;
|
||||
} controller;
|
||||
|
||||
// Cheats
|
||||
|
|
|
@ -353,6 +353,11 @@ namespace SohImGui {
|
|||
needs_save = true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("DPad Support in Ocarina and Text Choice", &Game::Settings.controller.dpad_ocarina_text)) {
|
||||
CVar_SetS32(const_cast<char*>("gDpadOcarinaText"), Game::Settings.controller.dpad_ocarina_text);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
|
|
@ -824,13 +824,12 @@ NatureAmbienceDataIO sNatureAmbienceDataIO[20] = {
|
|||
},
|
||||
};
|
||||
|
||||
u32 sOcarinaAllowedBtnMask =
|
||||
(BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT | BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT);
|
||||
u32 sOcarinaAllowedBtnMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT);
|
||||
s32 sOcarinaABtnMap = BTN_A;
|
||||
s32 sOcarinaCUPBtnMap = BTN_CUP | BTN_DUP;
|
||||
s32 sOcarinaCDownBtnMap = BTN_CDOWN | BTN_DDOWN;
|
||||
s32 sOcarinaCLeftBtnMap = BTN_CLEFT | BTN_DLEFT;
|
||||
s32 sOcarinaCRightBtnMap = BTN_CRIGHT | BTN_DRIGHT;
|
||||
s32 sOcarinaCUPBtnMap = BTN_CUP;
|
||||
s32 sOcarinaCDownBtnMap = BTN_CDOWN;
|
||||
s32 sOcarinaCLeftBtnMap = BTN_CLEFT;
|
||||
s32 sOcarinaCRightBtnMap = BTN_CRIGHT;
|
||||
u8 sOcarinaInpEnabled = 0;
|
||||
s8 D_80130F10 = 0; // "OCA", ocarina active?
|
||||
u8 sCurOcarinaBtnVal = 0xFF;
|
||||
|
@ -1248,8 +1247,9 @@ void func_800F56A8(void);
|
|||
void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId);
|
||||
s32 Audio_SetGanonDistVol(u8 targetVol);
|
||||
|
||||
// Function originally not called, so repurposing for DPad input
|
||||
void func_800EC960(u8 custom) {
|
||||
if (!custom) {
|
||||
if (custom) {
|
||||
osSyncPrintf("AUDIO : Ocarina Control Assign Normal\n");
|
||||
sOcarinaAllowedBtnMask =
|
||||
(BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT | BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT);
|
||||
|
@ -1258,14 +1258,6 @@ void func_800EC960(u8 custom) {
|
|||
sOcarinaCDownBtnMap = BTN_CDOWN | BTN_DDOWN;
|
||||
sOcarinaCLeftBtnMap = BTN_CLEFT | BTN_DLEFT;
|
||||
sOcarinaCRightBtnMap = BTN_CRIGHT | BTN_DRIGHT;
|
||||
} else {
|
||||
osSyncPrintf("AUDIO : Ocarina Control Assign Custom\n");
|
||||
sOcarinaAllowedBtnMask = (BTN_A | BTN_B | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT);
|
||||
sOcarinaABtnMap = BTN_B;
|
||||
sOcarinaCUPBtnMap = BTN_CDOWN;
|
||||
sOcarinaCDownBtnMap = BTN_A;
|
||||
sOcarinaCLeftBtnMap = BTN_CLEFT;
|
||||
sOcarinaCRightBtnMap = BTN_CRIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1550,6 +1542,7 @@ void func_800ED200(void) {
|
|||
|
||||
void func_800ED458(s32 arg0) {
|
||||
u32 phi_v1_2;
|
||||
bool dpad = CVar_GetS32("gDpadOcarinaText", 0);
|
||||
|
||||
if (D_80130F3C != 0 && D_80131880 != 0) {
|
||||
D_80131880--;
|
||||
|
@ -1569,6 +1562,7 @@ void func_800ED458(s32 arg0) {
|
|||
D_8016BA18 &= phi_v1_2;
|
||||
}
|
||||
|
||||
func_800EC960(dpad);
|
||||
if (D_8016BA18 & sOcarinaABtnMap) {
|
||||
osSyncPrintf("Presss NA_KEY_D4 %08x\n", sOcarinaABtnMap);
|
||||
sCurOcarinaBtnVal = 2;
|
||||
|
|
|
@ -203,8 +203,9 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) {
|
|||
static s16 sAnalogStickHeld = false;
|
||||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadOcarinaText", 0);
|
||||
|
||||
if ((input->rel.stick_y >= 30 && !sAnalogStickHeld) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
if ((input->rel.stick_y >= 30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
sAnalogStickHeld = true;
|
||||
msgCtx->choiceIndex--;
|
||||
if (msgCtx->choiceIndex > 128) {
|
||||
|
@ -212,7 +213,7 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) {
|
|||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
} else if ((input->rel.stick_y <= -30 && !sAnalogStickHeld) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
} else if ((input->rel.stick_y <= -30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
||||
sAnalogStickHeld = true;
|
||||
msgCtx->choiceIndex++;
|
||||
if (msgCtx->choiceIndex > numChoices) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue