aboutsummaryrefslogtreecommitdiff
path: root/hud/hud_views.c
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-02-20 00:11:23 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-02-20 00:11:23 +0100
commit2eef87c8970db643c4ef09e0fd9e8110c8193043 (patch)
tree78a9bcc7932ab8edb8669ded755ee2c81afc0912 /hud/hud_views.c
parentc135f85fcdc1eeedd04e0c9e9f626b907500f20a (diff)
finish condition and bad cost function
Diffstat (limited to 'hud/hud_views.c')
-rw-r--r--hud/hud_views.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hud/hud_views.c b/hud/hud_views.c
index 4828275..046ba53 100644
--- a/hud/hud_views.c
+++ b/hud/hud_views.c
@@ -14,6 +14,12 @@ void render_view_stats (SDL_Renderer* rend, txtd *t, int px, int py,
render_text_scaled(rend, sname, pname, t, 2);
h += 35;
+ float cost = info_unit_get_cost(info, tm);
+ float pcost[2] = { px+10, py+h };
+ char scost[64]; sprintf(scost, "COST: %.2f", cost);
+ render_text_scaled(rend, scost, pcost, t, 1);
+ h += 20;
+
float calcweight = info_unit_get_weight(info, tm);
float maxweight = info->chassis[tm->chassis].weight_max[
tm->levels[LEVEL_CHASSIS]];