Port over decomp updates for vis* and reimplement vismono fb (#4533)

* Port over decomp updates for vis*

* move vismono framebuffer handling to file
This commit is contained in:
Archez
2024-11-09 12:51:31 -05:00
committed by GitHub
parent 2603b97366
commit f12a2bbbb7
18 changed files with 593 additions and 335 deletions

View File

@@ -21,7 +21,7 @@
TransitionUnk sTrnsnUnk;
s32 gTrnsnUnkState;
VisMono gPlayVisMono;
Color_RGBA8_u32 D_801614B0;
Color_RGBA8_u32 gVisMonoColor;
FaultClient D_801614B8;
@@ -567,7 +567,7 @@ void Play_Init(GameState* thisx) {
TransitionFade_SetColor(&play->transitionFade, RGBA8(160, 160, 160, 255));
TransitionFade_Start(&play->transitionFade);
VisMono_Init(&gPlayVisMono);
D_801614B0.a = 0;
gVisMonoColor.a = 0;
Flags_UnsetAllEnv(play);
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetSize(&play->state.tha));
@@ -1422,11 +1422,9 @@ void Play_Draw(PlayState* play) {
TransitionFade_Draw(&play->transitionFade, &gfxP);
if (D_801614B0.a > 0) {
// gPlayVisMono.vis.primColor.rgba = D_801614B0.rgba;
// VisMono_Draw(&gPlayVisMono, &gfxP);
gDPSetGrayscaleColor(gfxP++, D_801614B0.r, D_801614B0.g, D_801614B0.b, D_801614B0.a);
gSPGrayscale(gfxP++, true);
if (gVisMonoColor.a > 0) {
gPlayVisMono.vis.primColor.rgba = gVisMonoColor.rgba;
VisMono_Draw(&gPlayVisMono, &gfxP);
}
gSPEndDisplayList(gfxP++);
@@ -1610,7 +1608,7 @@ void Play_Draw(PlayState* play) {
play->unk_121C7 = 2;
SREG(33) |= 1;
// 2S2H [Port] Continue to render the post world for pausing to avoid flashing the HUD
// SOH [Port] Continue to render the post world for pausing to avoid flashing the HUD
if (gTrnsnUnkState == 2) {
goto Play_Draw_skip;
}