From afed831aeda5415f1d99612d0f14541fdd34720f Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 13 Aug 2020 18:14:24 +0200 Subject: extended postfx and sniper hud fix --- src/render/Hud.cpp | 63 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'src/render/Hud.cpp') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 1e536382..08c0cb85 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -175,7 +175,8 @@ void CHud::Draw() rect.right = f3rdX + SCREEN_SCALE_X(32.0f * 0.6f); rect.bottom = f3rdY + SCREEN_SCALE_Y(32.0f * 0.6f); - Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); + Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f); } else { rect.left = f3rdX - SCREEN_SCALE_X(32.0f * 0.4f); @@ -183,7 +184,8 @@ void CHud::Draw() rect.right = f3rdX + SCREEN_SCALE_X(32.0f * 0.4f); rect.bottom = f3rdY + SCREEN_SCALE_Y(32.0f * 0.4f); - Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); + Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f); } } else { @@ -194,7 +196,9 @@ void CHud::Draw() rect.top = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(32.0f); rect.right = (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(32.0f); rect.bottom = (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(32.0f); - Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); + Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f); + } else if (Mode == CCam::MODE_1STPERSON_RUNABOUT) { rect.left = (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(32.0f * 0.7f); @@ -202,7 +206,8 @@ void CHud::Draw() rect.right = (SCREEN_WIDTH / 2) + SCREEN_SCALE_X(32.0f * 0.7f); rect.bottom = (SCREEN_HEIGHT / 2) + SCREEN_SCALE_Y(32.0f * 0.7f); - Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); + Sprites[HUD_SITEM16].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f); } else if (Mode == CCam::MODE_ROCKETLAUNCHER || Mode == CCam::MODE_ROCKETLAUNCHER_RUNABOUT) { RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE); @@ -216,29 +221,33 @@ void CHud::Draw() } else { // Sniper - rect.left = (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(210.0f); - rect.top = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(210.0f); - rect.right = SCREEN_WIDTH / 2; - rect.bottom = SCREEN_HEIGHT / 2; - Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); - - rect.right = (SCREEN_WIDTH / 2); - rect.top = (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(210.0f); - rect.left = SCREEN_SCALE_X(210.0f) + (SCREEN_WIDTH / 2); - rect.bottom = SCREEN_HEIGHT / 2; - Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); - - rect.left = (SCREEN_WIDTH / 2) - SCREEN_SCALE_X(210.0f); - rect.bottom = (SCREEN_HEIGHT / 2); - rect.right = (SCREEN_WIDTH / 2); - rect.top = SCREEN_SCALE_Y(210.0f) + (SCREEN_HEIGHT / 2); - Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); - - rect.right = (SCREEN_WIDTH / 2); - rect.bottom = (SCREEN_HEIGHT / 2); - rect.left = SCREEN_SCALE_X(210.0f) + (SCREEN_WIDTH / 2); - rect.top = SCREEN_SCALE_Y(210.0f) + (SCREEN_HEIGHT / 2); - Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255)); + rect.left = SCREEN_WIDTH/2 - SCREEN_SCALE_X(210.0f); + rect.top = SCREEN_HEIGHT/2 - SCREEN_SCALE_Y(210.0f); + rect.right = SCREEN_WIDTH/2; + rect.bottom = SCREEN_HEIGHT/2; + Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.01f, 0.01f, 1.0f, 0.0f, 0.01f, 1.0f, 1.0f, 1.0f); + + rect.left = SCREEN_WIDTH/2; + rect.top = SCREEN_HEIGHT/2 - SCREEN_SCALE_Y(210.0f); + rect.right = SCREEN_WIDTH/2 + SCREEN_SCALE_X(210.0f); + rect.bottom = SCREEN_HEIGHT/2; + Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.99f, 0.0f, 0.01f, 0.01f, 0.99f, 1.0f, 0.01f, 1.0f); + + rect.left = SCREEN_WIDTH/2 - SCREEN_SCALE_X(210.0f); + rect.top = SCREEN_HEIGHT/2; + rect.right = SCREEN_WIDTH/2; + rect.bottom = SCREEN_HEIGHT/2 + SCREEN_SCALE_Y(210.0f); + Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.01f, 0.99f, 1.0f, 0.99f, 0.01f, 0.01f, 1.0f, 0.01f); + + rect.left = SCREEN_WIDTH/2; + rect.top = SCREEN_HEIGHT/2; + rect.right = SCREEN_WIDTH/2 + SCREEN_SCALE_X(210.0f); + rect.bottom = SCREEN_HEIGHT/2 + SCREEN_SCALE_Y(210.0f); + Sprites[HUD_SITESNIPER].Draw(CRect(rect), CRGBA(255, 255, 255, 255), + 0.99f, 0.99f, 0.01f, 0.99f, 0.99f, 0.01f, 0.1f, 0.01f); } } RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void *)rwFILTERLINEAR); -- cgit v1.2.3