add a scissor to nametags to clip during credits
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

This commit is contained in:
Isaac0-dev 2025-03-27 17:09:04 +10:00
parent f2b4f4aaad
commit c5bf411a2a

View file

@ -113,6 +113,13 @@ void nametags_render(void) {
e->prevScale = scale;
e->inited = true;
}
// Scissor to clip during credits
extern Vp *D_8032CE74;
extern Vp *D_8032CE78;
Vp *viewport = D_8032CE74 == NULL ? D_8032CE78 : D_8032CE74;
if (viewport) { make_viewport_clip_rect(viewport); }
djui_hud_print_outlined_text_interpolated(name,
e->prevPos[0] - measure, e->prevPos[1], e->prevScale,
out[0] - measure, out[1], scale,
@ -128,6 +135,9 @@ void nametags_render(void) {
);
}
// Reset scissor
if (viewport) { gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT - BORDER_HEIGHT); }
vec3f_copy(e->prevPos, out);
e->prevScale = scale;
}