Clear the framebuffer for the pause menu link texture (#4213)
* clear pause menu link framebuffer * cache bust * Add enums for pause menu link width/height and rename the framebuffer * revert cache bust
This commit is contained in:
@@ -2075,10 +2075,12 @@ void Pause_DrawTriforceSpot(PlayState* play, s32 showLightColumn) {
|
||||
rotation += 0x03E8;
|
||||
}
|
||||
|
||||
void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot,
|
||||
f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height, Vec3f* eye, Vec3f* at,
|
||||
f32 fovy, void* img1, void* img2) {
|
||||
static Vp viewport = { 128, 224, 511, 0, 128, 224, 511, 0 };
|
||||
void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject, SkelAnime* skelAnime, Vec3f* pos,
|
||||
Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height,
|
||||
Vec3f* eye, Vec3f* at, f32 fovy, void* colorFrameBuffer, void* depthFrameBuffer) {
|
||||
// Note: the viewport x and y values are overwritten below, before usage
|
||||
static Vp viewport = { (PAUSE_EQUIP_PLAYER_WIDTH / 2) << 2, (PAUSE_EQUIP_PLAYER_HEIGHT / 2) << 2, G_MAXZ / 2, 0,
|
||||
(PAUSE_EQUIP_PLAYER_WIDTH / 2) << 2, (PAUSE_EQUIP_PLAYER_HEIGHT / 2) << 2, G_MAXZ / 2, 0 };
|
||||
static Lights1 lights1 = gdSPDefLights1(80, 80, 80, 255, 255, 255, 84, 84, 172);
|
||||
static Vec3f lightDir = { 89.8f, 0.0f, 89.8f };
|
||||
u8 playerSwordAndShield[2];
|
||||
@@ -2106,6 +2108,24 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
|
||||
gDPSetScissor(POLY_OPA_DISP++, G_SC_NON_INTERLACE, 0, 0, width, height);
|
||||
gSPClipRatio(POLY_OPA_DISP++, FRUSTRATIO_1);
|
||||
|
||||
gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, depthFrameBuffer);
|
||||
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_ZDZ(G_MAXFBZ, 0) << 16) | GPACK_ZDZ(G_MAXFBZ, 0));
|
||||
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, width - 1, height - 1);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
gDPSetColorImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, colorFrameBuffer);
|
||||
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_FILL);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_NOOP, G_RM_NOOP2);
|
||||
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(0, 0, 0, 1) << 16) | GPACK_RGBA5551(0, 0, 0, 1));
|
||||
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, width - 1, height - 1);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
gDPSetDepthImage(POLY_OPA_DISP++, depthFrameBuffer);
|
||||
|
||||
viewport.vp.vscale[0] = viewport.vp.vtrans[0] = width * 2;
|
||||
viewport.vp.vscale[1] = viewport.vp.vtrans[1] = height * 2;
|
||||
gSPViewport(POLY_OPA_DISP++, &viewport);
|
||||
@@ -2126,8 +2146,8 @@ void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime*
|
||||
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_Scale(scale * (CVarGetInteger(CVAR_ENHANCEMENT("MirroredWorld"), 0) ? -1 : 1), scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x04, seg04);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, seg06);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x04, gameplayKeep);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x06, linkObject);
|
||||
|
||||
gSPSetLights1(POLY_OPA_DISP++, lights1);
|
||||
|
||||
@@ -2401,8 +2421,8 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Player_DrawPauseImpl(play, segment + 0x3800, segment + 0x8800, skelAnime, pos, rot, scale, sword, tunic, shield,
|
||||
boots, 64, 112, &eye, &at, 60.0f, play->state.gfxCtx->curFrameBuffer,
|
||||
play->state.gfxCtx->curFrameBuffer + 0x1C00);
|
||||
boots, PAUSE_EQUIP_PLAYER_WIDTH, PAUSE_EQUIP_PLAYER_HEIGHT, &eye, &at, 60.0f,
|
||||
play->state.gfxCtx->curFrameBuffer,
|
||||
play->state.gfxCtx->curFrameBuffer + (PAUSE_EQUIP_PLAYER_WIDTH * PAUSE_EQUIP_PLAYER_HEIGHT));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user