1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 11:24:40 +00:00

Merge branch 'master' into doc_pause_menu

This commit is contained in:
Dragorn421 2022-12-20 11:55:02 +01:00
commit 86a0ee0c83
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118
7 changed files with 28 additions and 22 deletions

10
Jenkinsfile vendored
View file

@ -62,7 +62,15 @@ pipeline {
} }
post { post {
always { always {
cleanWs() echo "Finished, deleting directory."
deleteDir()
}
cleanup {
echo "Clean up in post."
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true)
} }
} }
} }

View file

@ -659,6 +659,14 @@ typedef struct {
} restrictions; } restrictions;
} InterfaceContext; // size = 0x270 } InterfaceContext; // size = 0x270
typedef enum {
/* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing.
/* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background.
/* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters.
/* 3 */ PAUSE_BG_PRERENDER_DONE, // The pause background is ready to be used.
/* 4 */ PAUSE_BG_PRERENDER_MAX
} PauseBgPreRenderState;
typedef struct { typedef struct {
/* 0x00 */ void* loadedRamAddr; /* 0x00 */ void* loadedRamAddr;
/* 0x04 */ uintptr_t vromStart; /* 0x04 */ uintptr_t vromStart;
@ -760,14 +768,6 @@ typedef enum {
/* 6 */ PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_ALT /* 6 */ PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_ALT
} PauseSavePromptState; } PauseSavePromptState;
typedef enum {
/* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing.
/* 1 */ PAUSE_BG_PRERENDER_DRAW, // The current frame is only drawn for the purpose of serving as the pause background.
/* 2 */ PAUSE_BG_PRERENDER_FILTER, // The previous frame was PAUSE_BG_PRERENDER_DRAW, now apply prerender filters.
/* 3 */ PAUSE_BG_PRERENDER_DONE, // The pause background is ready to be used.
/* 4 */ PAUSE_BG_PRERENDER_MAX
} PauseBgPreRenderState;
typedef enum { typedef enum {
/* 0 */ PAUSE_QUAD_CURSOR_TL, /* 0 */ PAUSE_QUAD_CURSOR_TL,
/* 1 */ PAUSE_QUAD_CURSOR_TR, /* 1 */ PAUSE_QUAD_CURSOR_TR,

View file

@ -319,7 +319,7 @@ void GameState_Update(GameState* gameState) {
} }
} }
if (R_PAUSE_BG_PRERENDER_STATE != (u32)PAUSE_BG_PRERENDER_FILTER) { if (R_PAUSE_BG_PRERENDER_STATE != (u32)PAUSE_BG_PRERENDER_PROCESS) {
GameState_Draw(gameState, gfxCtx); GameState_Draw(gameState, gfxCtx);
func_800C49F4(gfxCtx); func_800C49F4(gfxCtx);
} }

View file

@ -61,7 +61,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
if (Letterbox_GetSize() == 0) { if (Letterbox_GetSize() == 0) {
R_HREG_MODE = HREG_MODE_UCODE_DISAS; R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_LOG_MODE = 3; R_UCODE_DISAS_LOG_MODE = 3;
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_DRAW; R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING; pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_WAIT_BG_PRERENDER pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_WAIT_BG_PRERENDER
@ -69,7 +69,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
} else if (pauseCtx->state == PAUSE_STATE_8) { } else if (pauseCtx->state == PAUSE_STATE_8) {
R_HREG_MODE = HREG_MODE_UCODE_DISAS; R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_LOG_MODE = 3; R_UCODE_DISAS_LOG_MODE = 3;
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_DRAW; R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING; pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_9 pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_9

View file

@ -3238,7 +3238,7 @@ void Interface_Draw(PlayState* play) {
Magic_DrawMeter(play); Magic_DrawMeter(play);
Minimap_Draw(play); Minimap_Draw(play);
if ((R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_FILTER) && if ((R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_PROCESS) &&
(R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_DONE)) { (R_PAUSE_BG_PRERENDER_STATE != PAUSE_BG_PRERENDER_DONE)) {
func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target
} }

View file

@ -1115,8 +1115,8 @@ void Play_Draw(PlayState* this) {
} else { } else {
PreRender_SetValues(&this->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, gfxCtx->curFrameBuffer, gZBuffer); PreRender_SetValues(&this->pauseBgPreRender, SCREEN_WIDTH, SCREEN_HEIGHT, gfxCtx->curFrameBuffer, gZBuffer);
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_FILTER) { if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_PROCESS) {
// Wait for the previous frame's DList to be processed, // Wait for the previous frame's display list to be processed,
// so that `pauseBgPreRender.fbufSave` and `pauseBgPreRender.cvgSave` are filled with the appropriate // so that `pauseBgPreRender.fbufSave` and `pauseBgPreRender.cvgSave` are filled with the appropriate
// content and can be used by `PreRender_ApplyFilters` below. // content and can be used by `PreRender_ApplyFilters` below.
Sched_FlushTaskQueue(); Sched_FlushTaskQueue();
@ -1244,19 +1244,19 @@ void Play_Draw(PlayState* this) {
DebugDisplay_DrawObjects(this); DebugDisplay_DrawObjects(this);
} }
if ((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DRAW) || (gTrnsnUnkState == 1)) { if ((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) || (gTrnsnUnkState == 1)) {
Gfx* gfxP = OVERLAY_DISP; Gfx* gfxP = OVERLAY_DISP;
// Copy the frame buffer contents at this point in the DList to the zbuffer // Copy the frame buffer contents at this point in the display list to the zbuffer
// The zbuffer must then stay untouched until unpausing // The zbuffer must then stay untouched until unpausing
this->pauseBgPreRender.fbuf = gfxCtx->curFrameBuffer; this->pauseBgPreRender.fbuf = gfxCtx->curFrameBuffer;
this->pauseBgPreRender.fbufSave = (u16*)gZBuffer; this->pauseBgPreRender.fbufSave = (u16*)gZBuffer;
PreRender_SaveFramebuffer(&this->pauseBgPreRender, &gfxP); PreRender_SaveFramebuffer(&this->pauseBgPreRender, &gfxP);
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DRAW) { if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_SETUP) {
this->pauseBgPreRender.cvgSave = (u8*)gfxCtx->curFrameBuffer; this->pauseBgPreRender.cvgSave = (u8*)gfxCtx->curFrameBuffer;
PreRender_DrawCoverage(&this->pauseBgPreRender, &gfxP); PreRender_DrawCoverage(&this->pauseBgPreRender, &gfxP);
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_FILTER; R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_PROCESS;
} else { } else {
gTrnsnUnkState = 2; gTrnsnUnkState = 2;
} }

View file

@ -1469,9 +1469,7 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
gDPSetDepthImage(POLY_XLU_DISP++, gZBuffer); gDPSetDepthImage(POLY_XLU_DISP++, gZBuffer);
gDPSetDepthImage(OVERLAY_DISP++, gZBuffer); gDPSetDepthImage(OVERLAY_DISP++, gZBuffer);
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_DRAW) if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTrnsnUnkState < 2)) {
/* PAUSE_BG_PRERENDER_OFF, PAUSE_BG_PRERENDER_DRAW */
&& (gTrnsnUnkState < 2)) {
s32 letterboxSize = Letterbox_GetSize(); s32 letterboxSize = Letterbox_GetSize();
if (R_HREG_MODE == HREG_MODE_SETUP_FRAME) { if (R_HREG_MODE == HREG_MODE_SETUP_FRAME) {