Add death overlay

This commit is contained in:
James Lambert 2023-02-06 08:45:07 -07:00
parent a13f45a494
commit 18e6a4090f
4 changed files with 20 additions and 1 deletions

View file

@ -17,4 +17,17 @@ materials:
r: 255 r: 255
g: 255 g: 255
b: 255 b: 255
a: 255 a: 255
death_overlay:
gDPSetRenderMode: G_RM_XLU_SURF
gSPGeometryMode:
clear: [G_ZBUFFER]
gDPSetCombineMode:
color: ["0", "0", "0", "PRIMITIVE"]
alpha: ["0", "0", "0", "PRIMITIVE"]
gDPSetPrimColor:
r: 255
g: 0
b: 0
a: 128

View file

@ -24,6 +24,12 @@
#define HUD_LOWER_Y ((SCREEN_HT - HUD_OUTER_HEIGHT + (HUD_OUTER_OFFSET_Y << 1)) << 1) #define HUD_LOWER_Y ((SCREEN_HT - HUD_OUTER_HEIGHT + (HUD_OUTER_OFFSET_Y << 1)) << 1)
void hudRender(struct RenderState* renderState, int playerFlags) { void hudRender(struct RenderState* renderState, int playerFlags) {
if (playerFlags & PlayerIsDead) {
gSPDisplayList(renderState->dl++, hud_death_overlay);
gDPFillRectangle(renderState->dl++, 0, 0, SCREEN_WD, SCREEN_HT);
gSPDisplayList(renderState->dl++, hud_death_overlay_revert);
// }
gSPDisplayList(renderState->dl++, hud_material_list[PORTAL_CROSSHAIRS_INDEX]); gSPDisplayList(renderState->dl++, hud_material_list[PORTAL_CROSSHAIRS_INDEX]);
// gSPTextureRectangle(renderState->dl++, // gSPTextureRectangle(renderState->dl++,