diff --git a/include/variables.h b/include/variables.h index 1a3b289bea..d1be043240 100644 --- a/include/variables.h +++ b/include/variables.h @@ -122,7 +122,7 @@ extern s32 gScreenWidth; extern s32 gScreenHeight; extern Mtx gMtxClear; extern MtxF gMtxFClear; -extern u32 D_8012DBC0; +extern u32 gIsCtrlr2Valid; extern vu32 gIrqMgrResetStatus; extern volatile OSTime gIrqMgrRetraceTime; extern s16* gWaveSamples[9]; diff --git a/src/code/code_800D31A0.c b/src/code/code_800D31A0.c index 7c0b43ac8a..8e8a438c61 100644 --- a/src/code/code_800D31A0.c +++ b/src/code/code_800D31A0.c @@ -1,7 +1,7 @@ #include "global.h" #include "vt.h" -u32 D_8012DBC0 = false; +u32 gIsCtrlr2Valid = false; void func_800D31A0(void) { osSyncPrintf(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST); @@ -11,9 +11,9 @@ void func_800D31A0(void) { } void func_800D31F0(void) { - D_8012DBC0 = (gPadMgr.validCtrlrsMask & 2) != 0; + gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0; } void func_800D3210(void) { - D_8012DBC0 = false; + gIsCtrlr2Valid = false; } diff --git a/src/code/game.c b/src/code/game.c index 2f9db0d4e8..cc7128616a 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -84,7 +84,7 @@ void func_800C4344(GameState* gameState) { HREG(95) = CHECK_BTN_ALL(selectedInput->press.button, hReg82); } - if (D_8012DBC0 != 0) { + if (gIsCtrlr2Valid) { func_8006390C(&gameState->input[1]); } diff --git a/src/code/graph.c b/src/code/graph.c index 017d68fc04..16f5393455 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -381,14 +381,14 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { sGraphUpdateTime = time; } - if (D_8012DBC0 && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) && + if (gIsCtrlr2Valid && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) && CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) { gSaveContext.gameMode = 0; SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext); gameState->running = false; } - if (D_8012DBC0 && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->unk_A0) { + if (gIsCtrlr2Valid && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->unk_A0) { // "To reset mode" osSyncPrintf(VT_COL(YELLOW, BLACK) "PRE-NMIによりリセットモードに移行します\n" VT_RST); SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIContext); diff --git a/src/code/padmgr.c b/src/code/padmgr.c index 9de0882ccb..e775006706 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -286,7 +286,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) { mask = 0; for (i = 0; i < 4; i++) { if (padMgr->padStatus[i].errno == 0) { - if (padMgr->padStatus[i].type == 5) { + if (padMgr->padStatus[i].type == CONT_TYPE_NORMAL) { mask |= 1 << i; } else { LOG_HEX("this->pad_status[i].type", padMgr->padStatus[i].type, "../padmgr.c", 458); diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index 4a3df1143b..f338310c0d 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -127,7 +127,7 @@ void Title_Main(GameState* thisx) { Title_Calc(this); Title_Draw(this); - if (D_8012DBC0) { + if (gIsCtrlr2Valid) { Gfx* gfx = POLY_OPA_DISP; s32 pad;