mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-17 21:35:11 +00:00
Some doc, some regs, some bulk rename of wip enums, add enum for R_PAUSE_MENU_MODE
This commit is contained in:
parent
8ddd1c1051
commit
5337eddf3a
22 changed files with 494 additions and 421 deletions
|
@ -2103,7 +2103,7 @@ void Interface_SetDoAction(PlayState* play, u16 action) {
|
|||
interfaceCtx->unk_1EC = 1;
|
||||
interfaceCtx->unk_1F4 = 0.0f;
|
||||
Interface_LoadActionLabel(interfaceCtx, action, 1);
|
||||
if (pauseCtx->state != PAUSECTX_STATE_0) {
|
||||
if (pauseCtx->state != PAUSE_STATE_0) {
|
||||
interfaceCtx->unk_1EC = 3;
|
||||
}
|
||||
}
|
||||
|
@ -2518,9 +2518,10 @@ void Magic_Update(PlayState* play) {
|
|||
|
||||
case MAGIC_STATE_CONSUME_LENS:
|
||||
// Slowly consume magic while lens is on
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) &&
|
||||
!Play_InCsMode(play)) {
|
||||
if ((gSaveContext.magic == 0) || ((func_8008F2F8(play) >= 2) && (func_8008F2F8(play) < 5)) ||
|
||||
((gSaveContext.equips.buttonItems[1] != ITEM_LENS) &&
|
||||
(gSaveContext.equips.buttonItems[2] != ITEM_LENS) &&
|
||||
|
@ -2763,10 +2764,12 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
(R_ITEM_BTN_X(3) + R_ITEM_BTN_WIDTH(3)) << 2, (R_ITEM_BTN_Y(3) + R_ITEM_BTN_WIDTH(3)) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(3) << 1, R_ITEM_BTN_DD(3) << 1);
|
||||
|
||||
if ((pauseCtx->state < PAUSECTX_STATE_8) /* PAUSECTX_STATE_0, PAUSECTX_STATE_1, PAUSECTX_STATE_2, PAUSECTX_STATE_3,
|
||||
PAUSECTX_STATE_4, PAUSECTX_STATE_5, PAUSECTX_STATE_6, PAUSECTX_STATE_7_SAVE_PROMPT_ */
|
||||
|| (pauseCtx->state >= PAUSECTX_STATE_18_FLIP_PAGES_AND_UNPAUSE) /* PAUSECTX_STATE_18_FLIP_PAGES_AND_UNPAUSE, PAUSECTX_STATE_19_UNPAUSE */) {
|
||||
if ((play->pauseCtx.state != 0) || (play->pauseCtx.debugState != 0)) {
|
||||
if ((pauseCtx->state < PAUSE_STATE_8) /* PAUSE_STATE_0, PAUSE_STATE_1, PAUSE_STATE_2, PAUSE_STATE_3,
|
||||
PAUSE_STATE_4, PAUSE_STATE_5, PAUSE_STATE_6, PAUSE_STATE_7_SAVE_PROMPT_ */
|
||||
||
|
||||
(pauseCtx->state >=
|
||||
PAUSE_STATE_18_FLIP_PAGES_AND_UNPAUSE) /* PAUSE_STATE_18_FLIP_PAGES_AND_UNPAUSE, PAUSE_STATE_19_UNPAUSE */) {
|
||||
if ((play->pauseCtx.state != PAUSE_STATE_0) || (play->pauseCtx.debugState != 0)) {
|
||||
// Start Button Texture, Color & Label
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 120, 120, 120, interfaceCtx->startAlpha);
|
||||
|
@ -2794,7 +2797,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (interfaceCtx->naviCalling && (play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
|
||||
if (interfaceCtx->naviCalling && (play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0) &&
|
||||
(play->csCtx.state == CS_STATE_IDLE)) {
|
||||
if (!sCUpInvisible) {
|
||||
// C-Up Button Texture, Color & Label (Navi Text)
|
||||
|
@ -3205,7 +3208,7 @@ void Interface_Draw(PlayState* play) {
|
|||
Magic_DrawMeter(play);
|
||||
Minimap_Draw(play);
|
||||
|
||||
if ((R_PAUSE_MENU_MODE != 2) && (R_PAUSE_MENU_MODE != 3)) {
|
||||
if ((R_PAUSE_MENU_MODE != PAUSE_MENU_REG_MODE_2) && (R_PAUSE_MENU_MODE != PAUSE_MENU_REG_MODE_3)) {
|
||||
func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target
|
||||
}
|
||||
|
||||
|
@ -3320,7 +3323,7 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
func_8008A994(interfaceCtx);
|
||||
|
||||
if ((pauseCtx->state == PAUSECTX_STATE_6) && (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_3)) {
|
||||
if ((pauseCtx->state == PAUSE_STATE_6) && (pauseCtx->unk_1E4_ps6_ == PAUSE_S6_3)) {
|
||||
// Inventory Equip Effects
|
||||
gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment);
|
||||
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
|
||||
|
@ -3371,7 +3374,7 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0)) {
|
||||
if (gSaveContext.minigameState != 1) {
|
||||
// Carrots rendering if the action corresponds to riding a horse
|
||||
if (interfaceCtx->unk_1EE == 8) {
|
||||
|
@ -3467,7 +3470,7 @@ void Interface_Draw(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play) && (gSaveContext.minigameState != 1) &&
|
||||
|
@ -3891,7 +3894,7 @@ void Interface_Update(PlayState* play) {
|
|||
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
||||
}
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0)) {
|
||||
if ((gSaveContext.minigameState == 1) || !IS_CUTSCENE_LAYER ||
|
||||
((play->sceneId == SCENE_SPOT20) && (gSaveContext.sceneLayer == 4))) {
|
||||
if ((msgCtx->msgMode == MSGMODE_NONE) ||
|
||||
|
@ -4035,10 +4038,10 @@ void Interface_Update(PlayState* play) {
|
|||
|
||||
Health_UpdateMeter(play);
|
||||
|
||||
if ((gSaveContext.timer1State >= 3) && (play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && !(player->stateFlags2 & PLAYER_STATE2_24) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) &&
|
||||
!Play_InCsMode(play)) {}
|
||||
if ((gSaveContext.timer1State >= 3) && (play->pauseCtx.state == PAUSE_STATE_0) &&
|
||||
(play->pauseCtx.debugState == 0) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
!(player->stateFlags2 & PLAYER_STATE2_24) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {}
|
||||
|
||||
if (gSaveContext.rupeeAccumulator != 0) {
|
||||
if (gSaveContext.rupeeAccumulator > 0) {
|
||||
|
@ -4121,9 +4124,10 @@ void Interface_Update(PlayState* play) {
|
|||
WREG(7) = interfaceCtx->unk_1F4;
|
||||
|
||||
// Update Magic
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && ((play->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(play))) {
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_0) && (play->pauseCtx.debugState == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionMode == TRANS_MODE_OFF) &&
|
||||
((play->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(play))) {
|
||||
|
||||
if (gSaveContext.isMagicAcquired && (gSaveContext.magicLevel == 0)) {
|
||||
gSaveContext.magicLevel = gSaveContext.isDoubleMagicAcquired + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue