mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07:00
Consolidate D-pad CVars and clean up presets (#1298)
* Consolidate D-pad CVars * Update other tooltip * Clean up presets * Fix incorrect preset value * Undo crouch
This commit is contained in:
parent
c5acef2957
commit
b54f6daa27
11 changed files with 68 additions and 44 deletions
|
@ -951,7 +951,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, GlobalContext* globalCtx
|
|||
void EnOssan_State_FacingShopkeeper(EnOssan* this, GlobalContext* globalCtx, Player* player) {
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
u8 nextIndex;
|
||||
bool dpad = CVar_GetS32("gDpadShop", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) &&
|
||||
!EnOssan_TestEndInteraction(this, globalCtx, &globalCtx->state.input[0])) {
|
||||
|
@ -1030,7 +1030,7 @@ void EnOssan_CursorUpDown(EnOssan* this, GlobalContext* globalCtx) {
|
|||
Input* input = &globalCtx->state.input[0];
|
||||
u8 curTemp = this->cursorIndex;
|
||||
u8 curScanTemp;
|
||||
bool dpad = CVar_GetS32("gDpadShop", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if ((this->stickAccumY < 0) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
||||
curTemp &= 0xFE;
|
||||
|
@ -1183,7 +1183,7 @@ void EnOssan_State_BrowseLeftShelf(EnOssan* this, GlobalContext* globalCtx, Play
|
|||
u8 prevIndex = this->cursorIndex;
|
||||
s32 c;
|
||||
s32 d;
|
||||
bool dpad = CVar_GetS32("gDpadShop", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (!EnOssan_ReturnItemToShelf(this)) {
|
||||
osSyncPrintf("%s[%d]:" VT_FGCOL(GREEN) "ズーム中!!" VT_RST "\n", __FILE__, __LINE__);
|
||||
|
@ -1243,7 +1243,7 @@ void EnOssan_State_BrowseRightShelf(EnOssan* this, GlobalContext* globalCtx, Pla
|
|||
s32 pad[2];
|
||||
u8 prevIndex;
|
||||
u8 nextIndex;
|
||||
bool dpad = CVar_GetS32("gDpadShop", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
prevIndex = this->cursorIndex;
|
||||
if (!EnOssan_ReturnItemToShelf(this)) {
|
||||
|
|
|
@ -394,7 +394,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
|||
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (CVar_GetS32("gRandoGenerating", 0) != 0 && generating == 0) {
|
||||
generating = 1;
|
||||
|
@ -1591,7 +1591,7 @@ void FileChoose_FadeInFileInfo(GameState* thisx) {
|
|||
void FileChoose_ConfirmFile(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
|
||||
if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) {
|
||||
|
@ -1897,7 +1897,7 @@ void FileChoose_Main(GameState* thisx) {
|
|||
this->stickRelX = input->rel.stick_x;
|
||||
this->stickRelY = input->rel.stick_y;
|
||||
|
||||
if (CVar_GetS32("gDpadHoldChange", 1) && CVar_GetS32("gDpadPauseName", 0)) {
|
||||
if (CVar_GetS32("gDpadHoldChange", 1) && CVar_GetS32("gDpadText", 0)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
this->inputTimerX = 10;
|
||||
|
|
|
@ -61,7 +61,7 @@ void FileChoose_SetupCopySource(GameState* thisx) {
|
|||
void FileChoose_SelectCopySource(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -173,7 +173,7 @@ void FileChoose_SetupCopyDest2(GameState* thisx) {
|
|||
void FileChoose_SelectCopyDest(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -357,7 +357,7 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
|||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
u16 dayTime;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -675,7 +675,7 @@ void FileChoose_SetupEraseSelect(GameState* thisx) {
|
|||
void FileChoose_EraseSelect(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -812,7 +812,7 @@ void FileChoose_SetupEraseConfirm2(GameState* thisx) {
|
|||
void FileChoose_EraseConfirm(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
|
|
@ -533,7 +533,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
s16 prevKbdX;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
this->kbdButton = 99;
|
||||
|
||||
|
@ -678,7 +678,7 @@ static u8 sSelectedSetting;
|
|||
void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
|
|
@ -82,7 +82,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
s16 pad2;
|
||||
s16 phi_s0_2;
|
||||
s16 sp208[3];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadPause", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
s16 cursorX;
|
||||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
bool dpad = (CVar_GetS32("gDpadPauseName", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool dpad = (CVar_GetS32("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
|
@ -503,7 +503,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx);
|
||||
|
||||
u16 buttonsToCheck = BTN_A | BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT;
|
||||
if (CVar_GetS32("gDpadEquips", 0) && (!CVar_GetS32("gDpadPauseName", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
if (CVar_GetS32("gDpadEquips", 0) && (!CVar_GetS32("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
s16 moveCursorResult;
|
||||
bool dpad = (CVar_GetS32("gDpadPauseName", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool dpad = (CVar_GetS32("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
|
@ -386,7 +386,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
gSelectingMask = cursorSlot == SLOT_TRADE_CHILD;
|
||||
}
|
||||
u16 buttonsToCheck = BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT;
|
||||
if (CVar_GetS32("gDpadEquips", 0) && (!CVar_GetS32("gDpadPauseName", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
if (CVar_GetS32("gDpadEquips", 0) && (!CVar_GetS32("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) {
|
||||
buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT;
|
||||
}
|
||||
if (CHECK_BTN_ANY(input->press.button, buttonsToCheck)) {
|
||||
|
|
|
@ -52,7 +52,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
s16 stepG;
|
||||
s16 stepB;
|
||||
u16 rgba16;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadPause", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
@ -419,7 +419,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
s16 stepR;
|
||||
s16 stepG;
|
||||
s16 stepB;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadPause", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ void KaleidoScope_UpdatePrompt(GlobalContext* globalCtx) {
|
|||
Input* input = &globalCtx->state.input[0];
|
||||
s8 relStickX = input->rel.stick_x;
|
||||
s16 step;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadPause", 0);
|
||||
|
||||
if (((pauseCtx->state == 7) && (pauseCtx->unk_1EC == 1)) || (pauseCtx->state == 0xE) || (pauseCtx->state == 0x10)) {
|
||||
if ((pauseCtx->promptChoice == 0) && ((relStickX >= 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)))) {
|
||||
|
|
|
@ -963,7 +963,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
|||
return;
|
||||
}
|
||||
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
bool dpad = CVar_GetS32("gDpadPause", 0);
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT))) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
|
@ -1176,7 +1176,7 @@ void KaleidoScope_DrawPages(GlobalContext* globalCtx, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gDpadHoldChange", 1) && CVar_GetS32("gDpadPauseName", 0)) {
|
||||
if (CVar_GetS32("gDpadHoldChange", 1) && CVar_GetS32("gDpadPause", 0)) {
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
D_8082AD44 = XREG(8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue