mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-30 17:05:25 -04:00
Introduce z64pause_menu.h header (#1505)
* z64pause_menu.h * move functions and variables * Move PauseMenuPage * move stuff that seems public to the new header * KALEIDO_OVL_MAX * bss * review * IS_PAUSED * format * add argument to pause macros * Update include/z64pause_menu.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * bss * More IS_PAUSED I missed * early returns * bss * empty commit to trigger GHA * bss * bss * bss * includes * bss --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -9,8 +9,8 @@
|
||||
* B: exit
|
||||
* Hold Start and press B: clear all weekEventReg and eventInf flags
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
typedef struct FlagSetEntry {
|
||||
/* 0x0 */ u8* value;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "z64speed_meter.h"
|
||||
#include "z64vimode.h"
|
||||
#include "z64vis.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "debug.h"
|
||||
|
||||
s32 gFramerateDivisor = 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z64bgcheck.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "libc64/fixed_point.h"
|
||||
#include "libc64/sprintf.h"
|
||||
@@ -8,8 +8,6 @@
|
||||
#include "vt.h"
|
||||
#include "z64actor.h"
|
||||
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
#define DYNA_RAYCAST_FLOORS 1
|
||||
#define DYNA_RAYCAST_WALLS 2
|
||||
#define DYNA_RAYCAST_CEILINGS 4
|
||||
|
||||
@@ -17,6 +17,7 @@ s16 gDungeonBossWarpSceneId;
|
||||
#include "z64quake.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
|
||||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "z64pause_menu.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "loadfragment.h"
|
||||
@@ -8,13 +10,14 @@
|
||||
SEGMENT_END(ovl_##name), 0, #name, \
|
||||
}
|
||||
|
||||
KaleidoMgrOverlay gKaleidoMgrOverlayTable[] = {
|
||||
KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX] = {
|
||||
KALEIDO_OVERLAY(kaleido_scope),
|
||||
KALEIDO_OVERLAY(player_actor),
|
||||
};
|
||||
|
||||
void* sKaleidoAreaPtr = NULL;
|
||||
KaleidoMgrOverlay* gKaleidoMgrCurOvl = NULL;
|
||||
|
||||
FaultAddrConvClient sKaleidoMgrFaultAddrConvClient;
|
||||
|
||||
uintptr_t KaleidoManager_FaultAddrConv(uintptr_t address, void* param) {
|
||||
@@ -71,7 +74,7 @@ void KaleidoManager_Init(PlayState* play) {
|
||||
Fault_AddAddrConvClient(&sKaleidoMgrFaultAddrConvClient, KaleidoManager_FaultAddrConv, NULL);
|
||||
}
|
||||
|
||||
void KaleidoManager_Destroy() {
|
||||
void KaleidoManager_Destroy(void) {
|
||||
Fault_RemoveAddrConvClient(&sKaleidoMgrFaultAddrConvClient);
|
||||
|
||||
if (gKaleidoMgrCurOvl != NULL) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "z64pause_menu.h"
|
||||
|
||||
#include "z64.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
@@ -8,7 +9,7 @@ void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
extern void KaleidoScope_Update(PlayState* play);
|
||||
extern void KaleidoScope_Draw(PlayState* play);
|
||||
|
||||
void KaleidoScopeCall_LoadPlayer() {
|
||||
void KaleidoScopeCall_LoadPlayer(void) {
|
||||
KaleidoMgrOverlay* playerActorOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_PLAYER_ACTOR];
|
||||
|
||||
if (gKaleidoMgrCurOvl != playerActorOvl) {
|
||||
@@ -34,40 +35,42 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
|
||||
|
||||
if ((play->pauseCtx.state != PAUSE_STATE_OFF) || (play->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) {
|
||||
if ((pauseCtx->state == PAUSE_STATE_OPENING_0) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_0)) {
|
||||
if (ShrinkWindow_Letterbox_GetSize() == 0) {
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
|
||||
}
|
||||
} else if (pauseCtx->state == PAUSE_STATE_GAMEOVER_0) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pauseCtx->state == PAUSE_STATE_OPENING_0) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_0)) {
|
||||
if (ShrinkWindow_Letterbox_GetSize() == 0) {
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
|
||||
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
|
||||
(pauseCtx->state == PAUSE_STATE_OWL_WARP_1)) {
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
|
||||
pauseCtx->state++;
|
||||
}
|
||||
} else if (pauseCtx->state != PAUSE_STATE_OFF) {
|
||||
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
|
||||
if (gKaleidoMgrCurOvl != NULL) {
|
||||
KaleidoManager_ClearOvl(gKaleidoMgrCurOvl);
|
||||
}
|
||||
|
||||
KaleidoManager_LoadOvl(kaleidoScopeOvl);
|
||||
}
|
||||
} else if (pauseCtx->state == PAUSE_STATE_GAMEOVER_0) {
|
||||
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
|
||||
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
|
||||
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
|
||||
(pauseCtx->state == PAUSE_STATE_OWL_WARP_1)) {
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
|
||||
pauseCtx->state++;
|
||||
}
|
||||
} else if (pauseCtx->state != PAUSE_STATE_OFF) {
|
||||
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
|
||||
if (gKaleidoMgrCurOvl != NULL) {
|
||||
KaleidoManager_ClearOvl(gKaleidoMgrCurOvl);
|
||||
}
|
||||
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
|
||||
sKaleidoScopeUpdateFunc(play);
|
||||
KaleidoManager_LoadOvl(kaleidoScopeOvl);
|
||||
}
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
KaleidoManager_ClearOvl(kaleidoScopeOvl);
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
}
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
|
||||
sKaleidoScopeUpdateFunc(play);
|
||||
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
KaleidoManager_ClearOvl(kaleidoScopeOvl);
|
||||
KaleidoScopeCall_LoadPlayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+50
-33
@@ -1,7 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "z64pause_menu.h"
|
||||
|
||||
#include "z64.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "z64view.h"
|
||||
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
s16 sKaleidoSetupRightPageIndex[] = {
|
||||
@@ -10,12 +12,14 @@ s16 sKaleidoSetupRightPageIndex[] = {
|
||||
PAUSE_MASK, // PAUSE_QUEST
|
||||
PAUSE_ITEM, // PAUSE_MASK
|
||||
};
|
||||
|
||||
f32 sKaleidoSetupRightPageEyeX[] = {
|
||||
PAUSE_EYE_DIST * -PAUSE_MAP_X, // PAUSE_ITEM
|
||||
PAUSE_EYE_DIST * -PAUSE_QUEST_X, // PAUSE_MAP
|
||||
PAUSE_EYE_DIST * -PAUSE_MASK_X, // PAUSE_QUEST
|
||||
PAUSE_EYE_DIST * -PAUSE_ITEM_X, // PAUSE_MASK
|
||||
};
|
||||
|
||||
f32 sKaleidoSetupRightPageEyeZ[] = {
|
||||
PAUSE_EYE_DIST * -PAUSE_MAP_Z, // PAUSE_ITEM
|
||||
PAUSE_EYE_DIST * -PAUSE_QUEST_Z, // PAUSE_MAP
|
||||
@@ -89,39 +93,52 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
if (msgCtx && msgCtx) {}
|
||||
}
|
||||
|
||||
if ((pauseCtx->state == PAUSE_STATE_OFF) && (pauseCtx->debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE)) {
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if ((gSaveContext.save.cutsceneIndex < 0xFFF0) && (gSaveContext.nextCutsceneIndex < 0xFFF0)) {
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != MSGMODE_NONE) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if ((play->unk_1887C < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
|
||||
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
if (!CHECK_EVENTINF(EVENTINF_17) && !(player->stateFlags1 & PLAYER_STATE1_20)) {
|
||||
if (!(play->actorCtx.flags & ACTORCTX_FLAG_TELESCOPE_ON) &&
|
||||
!(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) {
|
||||
if (!play->actorCtx.isOverrideInputOn &&
|
||||
CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
pauseCtx->state = PAUSE_STATE_OPENING_0;
|
||||
func_800F4A10(play);
|
||||
// Set next page mode to scroll left
|
||||
pauseCtx->nextPageMode = pauseCtx->pageIndex * 2 + 1;
|
||||
Audio_SetPauseState(true);
|
||||
}
|
||||
if (IS_PAUSED(pauseCtx) || (play->gameOverCtx.state != GAMEOVER_INACTIVE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pauseCtx->state == PAUSE_STATE_OPENING_0) {
|
||||
GameState_SetFramerateDivisor(&play->state, 2);
|
||||
if (ShrinkWindow_Letterbox_GetSizeTarget() != 0) {
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(0);
|
||||
}
|
||||
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_OPEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((play->transitionTrigger != TRANS_TRIGGER_OFF) || (play->transitionMode != TRANS_MODE_OFF)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gSaveContext.save.cutsceneIndex >= 0xFFF0) || (gSaveContext.nextCutsceneIndex >= 0xFFF0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != MSGMODE_NONE) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if (play->unk_1887C >= 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gSaveContext.magicState == MAGIC_STATE_STEP_CAPACITY) || (gSaveContext.magicState == MAGIC_STATE_FILL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CHECK_EVENTINF(EVENTINF_17) || (player->stateFlags1 & PLAYER_STATE1_20)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((play->actorCtx.flags & ACTORCTX_FLAG_TELESCOPE_ON) ||
|
||||
(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!play->actorCtx.isOverrideInputOn && CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
gSaveContext.prevHudVisibility = gSaveContext.hudVisibility;
|
||||
pauseCtx->itemDescriptionOn = false;
|
||||
pauseCtx->state = PAUSE_STATE_OPENING_0;
|
||||
func_800F4A10(play);
|
||||
// Set next page mode to scroll left
|
||||
pauseCtx->nextPageMode = pauseCtx->pageIndex * 2 + 1;
|
||||
Audio_SetPauseState(true);
|
||||
}
|
||||
|
||||
if (pauseCtx->state == PAUSE_STATE_OPENING_0) {
|
||||
GameState_SetFramerateDivisor(&play->state, 2);
|
||||
if (ShrinkWindow_Letterbox_GetSizeTarget() != 0) {
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(0);
|
||||
}
|
||||
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_OPEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -60,12 +60,13 @@ u8 sGameOverLightsIntensity;
|
||||
Gfx* sSkyboxStarsDList;
|
||||
|
||||
#include "z64environment.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "libc/string.h"
|
||||
#include "sys_cfb.h"
|
||||
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "libc/string.h"
|
||||
|
||||
// Data
|
||||
f32 sSandstormLerpScale = 0.0f;
|
||||
@@ -1168,8 +1169,7 @@ void Environment_WipeRumbleRequests(void) {
|
||||
}
|
||||
|
||||
void Environment_UpdateSkyboxRotY(PlayState* play) {
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
((play->skyboxId == SKYBOX_NORMAL_SKY) || (play->skyboxId == SKYBOX_3))) {
|
||||
if (!IS_PAUSED(&play->pauseCtx) && ((play->skyboxId == SKYBOX_NORMAL_SKY) || (play->skyboxId == SKYBOX_3))) {
|
||||
play->skyboxCtx.rot.y -= R_TIME_SPEED * 1.0e-4f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "interface/parameter_static/parameter_static.h"
|
||||
|
||||
s16 sHeartsPrimColors[3][3] = { { 255, 70, 50 }, { 255, 190, 0 }, { 100, 100, 255 } };
|
||||
@@ -406,8 +405,8 @@ void LifeMeter_UpdateSizeAndBeep(PlayState* play) {
|
||||
if (interfaceCtx->lifeSizeChange <= 0) {
|
||||
interfaceCtx->lifeSizeChange = 0;
|
||||
interfaceCtx->lifeSizeChangeDirection = 0;
|
||||
if (!Player_InCsMode(play) && (play->pauseCtx.state == PAUSE_STATE_OFF) &&
|
||||
(play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) && LifeMeter_IsCritical() && !Play_InCsMode(play)) {
|
||||
if (!Player_InCsMode(play) && !IS_PAUSED(&play->pauseCtx) && LifeMeter_IsCritical() &&
|
||||
!Play_InCsMode(play)) {
|
||||
Audio_PlaySfx(NA_SE_SY_HITPOINT_ALARM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
s16 sMinimapInitPosX = 0;
|
||||
s16 sMinimapInitPosZ = 0;
|
||||
@@ -240,7 +239,7 @@ void Map_Update(PlayState* play) {
|
||||
|
||||
func_80105B34(play);
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
if (Map_IsInDungeonArea(play)) {
|
||||
floor = func_80109124(player->actor.world.pos.y);
|
||||
if (floor != -1) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#include "z64message.h"
|
||||
#include "message_data_static.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "message_data_static.h"
|
||||
#include "padmgr.h"
|
||||
#include "segment_symbols.h"
|
||||
#include "z64actor.h"
|
||||
#include "z64horse.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "z64save.h"
|
||||
|
||||
#include "interface/parameter_static/parameter_static.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "message_data_fmt_nes.h"
|
||||
#include "message_data_static.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
f32 sNESFontWidths[160] = {
|
||||
8.0f, 8.0f, 6.0f, 9.0f, 9.0f, 14.0f, 12.0f, 3.0f, 7.0f, 7.0f, 7.0f, 9.0f, 4.0f, 6.0f, 4.0f, 9.0f,
|
||||
|
||||
+20
-25
@@ -11,7 +11,6 @@
|
||||
#include "interface/do_action_static/do_action_static.h"
|
||||
#include "misc/story_static/story_static.h"
|
||||
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "overlays/actors/ovl_En_Mm3/z_en_mm3.h"
|
||||
|
||||
typedef enum {
|
||||
@@ -3676,10 +3675,9 @@ void Magic_Update(PlayState* play) {
|
||||
|
||||
case MAGIC_STATE_CONSUME_LENS:
|
||||
// Slowly consume magic while Lens of Truth is active
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) &&
|
||||
!Play_InCsMode(play)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {
|
||||
|
||||
if ((gSaveContext.save.saveInfo.playerData.magic == 0) ||
|
||||
((Player_GetEnvironmentalHazard(play) >= PLAYER_ENV_HAZARD_UNDERWATER_FLOOR) &&
|
||||
@@ -3719,9 +3717,9 @@ void Magic_Update(PlayState* play) {
|
||||
gSaveContext.magicState = MAGIC_STATE_CONSUME_GORON_ZORA;
|
||||
// fallthrough
|
||||
case MAGIC_STATE_CONSUME_GORON_ZORA:
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == 0) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (!Play_InCsMode(play)) {
|
||||
interfaceCtx->magicConsumptionTimer--;
|
||||
if (interfaceCtx->magicConsumptionTimer == 0) {
|
||||
@@ -3741,9 +3739,9 @@ void Magic_Update(PlayState* play) {
|
||||
break;
|
||||
|
||||
case MAGIC_STATE_CONSUME_GIANTS_MASK:
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx) && (msgCtx->msgMode == MSGMODE_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
(play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (!Play_InCsMode(play)) {
|
||||
interfaceCtx->magicConsumptionTimer--;
|
||||
if (interfaceCtx->magicConsumptionTimer == 0) {
|
||||
@@ -3933,8 +3931,8 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
D_801BF9E4[EQUIP_SLOT_C_RIGHT] * 2, D_801BF9E4[EQUIP_SLOT_C_RIGHT] * 2, 255,
|
||||
240, 0, interfaceCtx->cRightAlpha);
|
||||
|
||||
if (!IS_PAUSE_STATE_GAMEOVER) {
|
||||
if ((play->pauseCtx.state != PAUSE_STATE_OFF) || (play->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSE_STATE_GAMEOVER(pauseCtx)) {
|
||||
if (IS_PAUSED(&play->pauseCtx)) {
|
||||
OVERLAY_DISP = Gfx_DrawRect_DropShadow(OVERLAY_DISP, 0x88, 0x11, 0x16, 0x16, 0x5B6, 0x5B6, 0xFF, 0x82, 0x3C,
|
||||
interfaceCtx->startAlpha);
|
||||
// Start Button Texture, Color & Label
|
||||
@@ -3950,8 +3948,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (interfaceCtx->tatlCalling && (play->pauseCtx.state == PAUSE_STATE_OFF) &&
|
||||
(play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) && (play->csCtx.state == CS_STATE_IDLE) &&
|
||||
if (interfaceCtx->tatlCalling && !IS_PAUSED(&play->pauseCtx) && (play->csCtx.state == CS_STATE_IDLE) &&
|
||||
(sPictoState == PICTO_BOX_STATE_OFF)) {
|
||||
if (sCUpInvisible == 0) {
|
||||
// C-Up Button Texture, Color & Label (Tatl Text)
|
||||
@@ -4471,7 +4468,7 @@ void Interface_DrawClock(PlayState* play) {
|
||||
sClockAlphaTimer1 = 0;
|
||||
}
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
Gfx_SetupDL39_Overlay(play->state.gfxCtx);
|
||||
|
||||
/**
|
||||
@@ -5526,8 +5523,7 @@ void Interface_DrawTimers(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
// Not satisfying any of these conditions will pause the timer
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
if (!IS_PAUSED(&play->pauseCtx) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
((msgCtx->msgMode == MSGMODE_NONE) || ((msgCtx->msgMode != MSGMODE_NONE) && (msgCtx->currentTextId >= 0x1BB2) &&
|
||||
(msgCtx->currentTextId <= 0x1BB6))) &&
|
||||
!(player->stateFlags1 & PLAYER_STATE1_200) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
|
||||
@@ -5976,8 +5972,7 @@ void Interface_UpdateBottleTimers(PlayState* play) {
|
||||
s32 pad[2];
|
||||
|
||||
// Not satisfying any of these conditions will pause the bottle timer
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
if (!IS_PAUSED(&play->pauseCtx) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
|
||||
((msgCtx->msgMode == MSGMODE_NONE) || ((msgCtx->currentTextId >= 0x100) && (msgCtx->currentTextId <= 0x200)) ||
|
||||
((msgCtx->currentTextId >= 0x1BB2) && (msgCtx->currentTextId <= 0x1BB6))) &&
|
||||
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) &&
|
||||
@@ -6049,7 +6044,7 @@ void Interface_DrawMinigameIcons(PlayState* play) {
|
||||
|
||||
Gfx_SetupDL39_Overlay(play->state.gfxCtx);
|
||||
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
// Carrots rendering if the action corresponds to riding a horse
|
||||
if (interfaceCtx->unk_212 == DO_ACTION_FASTER) {
|
||||
// Load Carrot Icon
|
||||
@@ -6446,7 +6441,7 @@ void Interface_Draw(PlayState* play) {
|
||||
Interface_DrawPauseMenuEquippingIcons(play);
|
||||
|
||||
// Draw either the minigame countdown or the three-day clock
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
if ((interfaceCtx->minigameState != MINIGAME_STATE_NONE) &&
|
||||
(interfaceCtx->minigameState < MINIGAME_STATE_NO_COUNTDOWN_SETUP)) {
|
||||
// Minigame Countdown
|
||||
@@ -6648,7 +6643,7 @@ void Interface_Update(PlayState* play) {
|
||||
u16 aButtonDoAction;
|
||||
|
||||
// Update buttons
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
if (play->gameOverCtx.state == GAMEOVER_INACTIVE) {
|
||||
Interface_UpdateButtonsPart1(play);
|
||||
}
|
||||
@@ -6827,7 +6822,7 @@ void Interface_Update(PlayState* play) {
|
||||
}
|
||||
|
||||
// Update perfect letters
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
if (interfaceCtx->perfectLettersOn) {
|
||||
if (interfaceCtx->perfectLettersType == PERFECT_LETTERS_TYPE_1) {
|
||||
Interface_UpdatePerfectLettersType1(play);
|
||||
@@ -6840,7 +6835,7 @@ void Interface_Update(PlayState* play) {
|
||||
}
|
||||
|
||||
// Update minigame State
|
||||
if ((play->pauseCtx.state == PAUSE_STATE_OFF) && (play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) {
|
||||
if (!IS_PAUSED(&play->pauseCtx)) {
|
||||
if ((u32)interfaceCtx->minigameState != MINIGAME_STATE_NONE) {
|
||||
switch (interfaceCtx->minigameState) {
|
||||
case MINIGAME_STATE_COUNTDOWN_SETUP_3:
|
||||
|
||||
+4
-6
@@ -33,7 +33,6 @@ u8 sMotionBlurStatus;
|
||||
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
|
||||
#include "overlays/gamestates/ovl_opening/z_opening.h"
|
||||
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
#include "debug.h"
|
||||
|
||||
s32 gDbgCamEnabled = false;
|
||||
@@ -973,7 +972,7 @@ void Play_UpdateMain(PlayState* this) {
|
||||
KaleidoSetup_Update(this);
|
||||
}
|
||||
|
||||
sp5C = (this->pauseCtx.state != 0) || (this->pauseCtx.debugEditor != DEBUG_EDITOR_NONE);
|
||||
sp5C = IS_PAUSED(&this->pauseCtx);
|
||||
|
||||
AnimationContext_Reset(&this->animationCtx);
|
||||
Object_UpdateEntries(&this->objectCtx);
|
||||
@@ -1015,7 +1014,7 @@ void Play_UpdateMain(PlayState* this) {
|
||||
Room_Noop(this, &this->roomCtx.prevRoom, &input[1], 1);
|
||||
Skybox_Update(&this->skyboxCtx);
|
||||
|
||||
if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) {
|
||||
if (IS_PAUSED(&this->pauseCtx)) {
|
||||
KaleidoScopeCall_Update(this);
|
||||
} else if (this->gameOverCtx.state != GAMEOVER_INACTIVE) {
|
||||
GameOver_Update(this);
|
||||
@@ -1087,7 +1086,7 @@ void Play_Update(PlayState* this) {
|
||||
}
|
||||
|
||||
void Play_PostWorldDraw(PlayState* this) {
|
||||
if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) {
|
||||
if (IS_PAUSED(&this->pauseCtx)) {
|
||||
KaleidoScopeCall_Draw(this);
|
||||
}
|
||||
|
||||
@@ -1095,8 +1094,7 @@ void Play_PostWorldDraw(PlayState* this) {
|
||||
Interface_Draw(this);
|
||||
}
|
||||
|
||||
if (((this->pauseCtx.state == 0) && (this->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) ||
|
||||
(this->msgCtx.currentTextId != 0xFF)) {
|
||||
if (!IS_PAUSED(&this->pauseCtx) || (this->msgCtx.currentTextId != 0xFF)) {
|
||||
Message_Draw(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64pause_menu.h"
|
||||
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_200000 | \
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
Gfx gSetupDLs[SETUPDL_MAX][6] = {
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "z64horse.h"
|
||||
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
||||
void Sram_SyncWriteToFlash(SramContext* sramCtx, s32 curPage, s32 numPages);
|
||||
void func_80147314(SramContext* sramCtx, s32 fileNum);
|
||||
|
||||
Reference in New Issue
Block a user