summaryrefslogtreecommitdiffstats
path: root/src/render/Hud.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-08-15 17:56:52 +0200
commit1d5e3c74256038c763bbe8d1369715bc47f99dd8 (patch)
treeee2a1dac538b95ddb92d7744a6821917e7dd3056 /src/render/Hud.cpp
parentsubmodules (diff)
parentDon't react if player's targeting with melee (diff)
downloadre3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.gz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.bz2
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.lz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.xz
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.zst
re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.zip
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r--src/render/Hud.cpp63
1 files changed, 36 insertions, 27 deletions
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);