summaryrefslogtreecommitdiff
path: root/src/fpsgame/fps.cpp
diff options
context:
space:
mode:
authorxolatile2025-07-23 17:33:57 +0200
committerxolatile2025-07-23 17:33:57 +0200
commita5a051f3356046fcaeaa295272d6859defebb320 (patch)
tree2979d7bdbc94296bf4ccd6931bd37a91db4d6436 /src/fpsgame/fps.cpp
parent11a5f448e0f5c423a00103c5d36a776f07a600bd (diff)
downloadxolatile-badassbug-a5a051f3356046fcaeaa295272d6859defebb320.tar.xz
xolatile-badassbug-a5a051f3356046fcaeaa295272d6859defebb320.tar.zst
Alternative GUI, more info in scoreboard, icons, accuracy, pickup state...
Diffstat (limited to 'src/fpsgame/fps.cpp')
-rw-r--r--src/fpsgame/fps.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fpsgame/fps.cpp b/src/fpsgame/fps.cpp
index 2f2986e..377afa3 100644
--- a/src/fpsgame/fps.cpp
+++ b/src/fpsgame/fps.cpp
@@ -649,6 +649,7 @@ namespace game
void startmap(const char *name) // called just after a map load
{
+ pwreset();
ai::savewaypoints();
ai::clearwaypoints(true);
@@ -980,11 +981,20 @@ namespace game
flushhudmatrix();
defformatstring(label, "%d", p->ammo[gun]);
- int tw, th; text_bounds(label, tw, th);
+ int tw, th, moved, movew = 0, moveh = 0; text_bounds(label, tw, th);
vec2 textdrawpos = vec2(-tw, -th).div(2);
float ammoratio = (float)p->ammo[gun] / itemstats[gun-GUN_SG].add;
bvec color = bvec::hexcolor(p->ammo[gun] == 0 || ammoratio >= 1.0f ? 0xFFFFFF : (ammoratio >= 0.5f ? 0xFFC040 : 0xFF0000));
draw_text(label, textdrawpos.x, textdrawpos.y, color.r, color.g, color.b, alpha);
+ /// ALIGN STUFF AND ADD COMMAND FOR IT...
+ //~text_bounds(label, movew, moveh);
+ //~moved = movew + 6;
+ //~defformatstring(damagedealt, "| %d ", pwdamagedealt[gun]);
+ //~draw_text(damagedealt, textdrawpos.x+moved, textdrawpos.y, color.r, color.g, color.b, alpha);
+ //~text_bounds(damagedealt, movew, moveh);
+ //~moved += movew;
+ //~defformatstring(accuracy, "| %d %%", pwaccuracy[gun]);
+ //~draw_text(accuracy, textdrawpos.x+moved, textdrawpos.y, color.r, color.g, color.b, alpha);
pophudmatrix();
}