aboutsummaryrefslogtreecommitdiff
path: root/hud/hud_views.c
diff options
context:
space:
mode:
Diffstat (limited to 'hud/hud_views.c')
-rw-r--r--hud/hud_views.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hud/hud_views.c b/hud/hud_views.c
index 385501e..cd39611 100644
--- a/hud/hud_views.c
+++ b/hud/hud_views.c
@@ -43,7 +43,11 @@ void render_view_comp (SDL_Renderer* rend, txtd *t, int px, int py,
}
{
int n = stats_frame_sprintf(info, comp->perc +lvl, arr);
- for (int i=0; i<n; i++) { LABEL(px+pad, py+h, arr[i], 1); h += 15; }
+ for (int i=0; i<n; i++) {
+ char sperc[128]; sprintf(sperc, "%s%%", arr[i]);
+
+ LABEL(px+pad, py+h, sperc, 1); h += 15;
+ }
}
{
int n = stats_weapon_sprintf(info, comp->base_weapon +lvl, arr);
@@ -51,7 +55,10 @@ void render_view_comp (SDL_Renderer* rend, txtd *t, int px, int py,
}
{
int n = stats_weapon_sprintf(info, comp->perc_weapon +lvl, arr);
- for (int i=0; i<n; i++) { LABEL(px+pad, py+h, arr[i], 1); h += 15; }
+ for (int i=0; i<n; i++) {
+ char sperc[128]; sprintf(sperc, "%s%%", arr[i]);
+ LABEL(px+pad, py+h, sperc, 1); h += 15;
+ }
}
}