From a5a051f3356046fcaeaa295272d6859defebb320 Mon Sep 17 00:00:00 2001 From: xolatile Date: Wed, 23 Jul 2025 17:33:57 +0200 Subject: Alternative GUI, more info in scoreboard, icons, accuracy, pickup state... --- src/fpsgame/fps.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/fpsgame/fps.cpp') 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(); } -- cgit v1.2.3