1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

Name one is-controller-valid symbol (#1060)

* Document `D_8012DBC0` as `isCtrlr2Valid`

* `isCtrlr2Valid` missing `g` prefix

* Run formatter
This commit is contained in:
Dragorn421 2021-12-07 15:17:48 +01:00 committed by GitHub
parent 5f89b8543f
commit 70b858b724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View file

@ -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];

View file

@ -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;
}

View file

@ -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]);
}

View file

@ -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);

View file

@ -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);

View file

@ -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;