aboutsummaryrefslogtreecommitdiff
path: root/hud/hud_views.c
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-03-05 16:54:26 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-03-05 16:54:26 +0100
commitd1af4269c4130d11d77f61f1a2ac8f3e249f72f2 (patch)
tree05618430db0951262bd22e7bbe77b663c3c0346f /hud/hud_views.c
parent02e55b0647eb5c631e7d7669a13fd0d47ec26c15 (diff)
unit generator in hud, minor fix in movement, % in view and cost weights
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;
+ }
}
}