summaryrefslogtreecommitdiffstats
path: root/src/render/Hud.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-08-27 19:35:14 +0200
committerGitHub <noreply@github.com>2020-08-27 19:35:14 +0200
commita8999bbf38cae233e39b5995118fa03bca7894ef (patch)
treeada9bd1935512f4b46fe6b4f42d9160eb2281262 /src/render/Hud.cpp
parentbike shooting fix + trace temp fix (diff)
parentupdate librw (diff)
downloadre3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.gz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.bz2
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.lz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.xz
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.tar.zst
re3-a8999bbf38cae233e39b5995118fa03bca7894ef.zip
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r--src/render/Hud.cpp62
1 files changed, 35 insertions, 27 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 10408355..cbf3c7f2 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -205,7 +205,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);
@@ -213,7 +214,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 {
if (Mode == CCam::MODE_M16_1STPERSON ||
@@ -223,7 +225,8 @@ 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);
@@ -231,7 +234,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);
@@ -248,29 +252,33 @@ void CHud::Draw()
// TODO(Miami)
// 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(rwRENDERSTATESRCBLEND, (void *)rwBLENDSRCALPHA);