1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-13 02:10:57 +00:00

Minor Misc Cleanup 2 (#1422)

* misc cleanup

* more cleanup

* more cleanup

* PR Suggestions

* cleanup cond
This commit is contained in:
engineer124 2023-02-26 15:48:42 -05:00 committed by GitHub
parent d4a6b21d46
commit 35887e25ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 174 additions and 177 deletions

View file

@ -79,7 +79,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_kaleido_collect.c", 248);
if ((!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 5) || (pauseCtx->unk_1E4 == 8)) &&
if ((((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 5) || (pauseCtx->unk_1E4 == 8)) &&
(pauseCtx->pageIndex == PAUSE_QUEST)) {
pauseCtx->cursorColorSet = 0;

View file

@ -172,7 +172,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
while (cursorMoveResult == 0) {
if (pauseCtx->stickAdjX < -30) {
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
pauseCtx->cursorX[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -192,7 +192,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
if (pauseCtx->cursorY[PAUSE_EQUIP] >= 4) {
pauseCtx->cursorY[PAUSE_EQUIP] = 0;
@ -214,7 +214,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
pauseCtx->cursorX[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -228,7 +228,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
if (pauseCtx->cursorY[PAUSE_EQUIP] >= 4) {
pauseCtx->cursorY[PAUSE_EQUIP] = 0;
@ -262,7 +262,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
while (cursorMoveResult == 0) {
if (pauseCtx->stickAdjY > 30) {
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
pauseCtx->cursorY[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
@ -284,7 +284,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else if (pauseCtx->stickAdjY < -30) {
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
pauseCtx->cursorY[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {

View file

@ -131,7 +131,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
while (moveCursorResult == 0) {
if (pauseCtx->stickAdjX < -30) {
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
pauseCtx->cursorX[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -139,7 +139,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
@ -163,7 +163,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
pauseCtx->cursorX[PAUSE_ITEM] += 1;
pauseCtx->cursorX[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -171,7 +171,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else {
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
@ -287,7 +287,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
while (moveCursorResult == 0) {
if (pauseCtx->stickAdjY > 30) {
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
pauseCtx->cursorY[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {
@ -301,7 +301,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
} else if (pauseCtx->stickAdjY < -30) {
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
pauseCtx->cursorY[PAUSE_ITEM] += 1;
pauseCtx->cursorY[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) {

View file

@ -790,7 +790,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
if (!pauseCtx->pageIndex) { // pageIndex == PAUSE_ITEM
if ((u32)pauseCtx->pageIndex == PAUSE_ITEM) {
pauseCtx->unk_1F4 = pauseCtx->unk_204 + 314.0f;
Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, -pauseCtx->unk_1F0 / 10.0f, MTXMODE_NEW);
@ -1120,11 +1120,11 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 20, 30, 40, 0);
if ((pauseCtx->state == 6) && (pauseCtx->namedItem != PAUSE_ITEM_NONE) && (pauseCtx->nameDisplayTimer < WREG(89)) &&
(!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 2) || ((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) ||
(pauseCtx->unk_1E4 == 8)) &&
(((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 2) ||
((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) || (pauseCtx->unk_1E4 == 8)) &&
(pauseCtx->cursorSpecialPos == 0)) {
if (!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 2) || ((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) ||
(pauseCtx->unk_1E4 == 8)) {
if (((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 2) ||
((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 7)) || (pauseCtx->unk_1E4 == 8)) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] = -63;
pauseCtx->infoPanelVtx[17].v.ob[0] = pauseCtx->infoPanelVtx[19].v.ob[0] =
@ -1243,7 +1243,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
}
}
} else {
if (!pauseCtx->pageIndex) { // pageIndex == PAUSE_ITEM
if ((u32)pauseCtx->pageIndex == PAUSE_ITEM) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
WREG(49 + gSaveContext.language);
@ -2504,7 +2504,7 @@ void KaleidoScope_Update(PlayState* play) {
(((pauseCtx->state >= 4) && (pauseCtx->state <= 7)) ||
((pauseCtx->state >= 0xA) && (pauseCtx->state <= 0x12)))) {
if ((!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 8)) && (pauseCtx->state == 6)) {
if ((((u32)pauseCtx->unk_1E4 == 0) || (pauseCtx->unk_1E4 == 8)) && (pauseCtx->state == 6)) {
pauseCtx->stickAdjX = input->rel.stick_x;
pauseCtx->stickAdjY = input->rel.stick_y;
KaleidoScope_UpdateCursorSize(play);