mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Added DPad support to ocarina and text prompts (#137)
* Added DPad support to ocarina playing and text choice selection. * Wrap changes in CVar * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict * Fix mapping not updating if CVar is changed in-game * Remove unnecessary const_cast * Added DPad support to file selection and pause screens (#124) * Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan <maikelchan88@gmail.com> Co-authored-by: rozlette <Rozelette@users.noreply.github.com> * Added DPad support to ocarina playing and text choice selection. * Fixing rebase conflict again * Fix mapping not updating if CVar is changed in-game Co-authored-by: MaikelChan <maikelchan88@gmail.com> Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
This commit is contained in:
parent
beb454d000
commit
03a5c7ed29
5 changed files with 41 additions and 22 deletions
|
@ -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) {
|
||||
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) {
|
||||
} 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) {
|
||||
|
@ -3032,7 +3033,7 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
Input* input = &globalCtx->state.input[0];
|
||||
s16 var;
|
||||
s16 focusScreenPosX;
|
||||
s16 averageY;
|
||||
s16 averageY = 0;
|
||||
s16 playerFocusScreenPosY;
|
||||
s16 actorFocusScreenPosY;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue