From 2f345b1d6e130177efe4fa47d5b2bd11f352ce85 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Thu, 25 Feb 2021 16:36:55 +0100 Subject: guillotined dead code --- hud/hud.c | 10 +++++----- hud/hud_views.c | 8 -------- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'hud') diff --git a/hud/hud.c b/hud/hud.c index 0e8b4d6..9c1d892 100644 --- a/hud/hud.c +++ b/hud/hud.c @@ -987,7 +987,7 @@ void hud_render_overlay_game (overlay_game *og, MKb *mkb, float cost = 0; for (int i=0; iarmy_bp[0].uslen; i++) { - cost += info_unit_get_cost(info, &gst->army_bp[0].us[i].info); + cost += 10; } float cx = og->rect_army.x+5; float cy = og->rect_army.y+5 + 30; @@ -1102,7 +1102,7 @@ void hud_render_overlay_battle (overlay_battle *ob, MKb *mkb, { float cost = 0; for (int i=0; iarmy_bp[0].uslen; i++) { - cost += info_unit_get_cost(info, &gst->army_bp[0].us[i].info); + cost += 10; } float p[2] = { x+10, y+h }; char s[64]; sprintf(s, "COST: %.0f", cost); @@ -1110,7 +1110,7 @@ void hud_render_overlay_battle (overlay_battle *ob, MKb *mkb, float cost2 = 0; for (int i=0; iarmy_bp[1].uslen; i++) { - cost2 += info_unit_get_cost(info, &gst->army_bp[1].us[i].info); + cost2 += 10; } char p2[64]; sprintf(p2, "COST: %.0f", cost2); float p2w = get_text_width(p2, t); @@ -1122,7 +1122,7 @@ void hud_render_overlay_battle (overlay_battle *ob, MKb *mkb, for (int i=0; iar.uslen; i++) { if (gst->ar.us[i].hp <= 0) continue; if (gst->ar.us[i].owner == 0) { - dps += info_unit_get_dps(info, &gst->ar.us[i].info); + dps += 3; } } float p[2] = { x+10, y+h }; @@ -1133,7 +1133,7 @@ void hud_render_overlay_battle (overlay_battle *ob, MKb *mkb, for (int i=0; iar.uslen; i++) { if (gst->ar.us[i].hp <= 0) continue; if (gst->ar.us[i].owner == 1) { - dps2 += info_unit_get_dps(info, &gst->ar.us[i].info); + dps2 += 3; } } char p2[64]; sprintf(p2, "DAMAGE: %.0f", dps2); diff --git a/hud/hud_views.c b/hud/hud_views.c index a669034..2d3a9fd 100644 --- a/hud/hud_views.c +++ b/hud/hud_views.c @@ -115,7 +115,6 @@ void render_view_chassis (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int chassis, int lvl, SDL_Texture *sprites) { if (chassis != -1) { - info_chassis *ch = info->chassis+chassis; int h = 10; stats_comp *comp = info->stats[STATS_CHASSIS]+chassis; @@ -136,7 +135,6 @@ void render_view_battery (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int batt, int lvl) { if (batt != -1) { - info_battery *battery = info->batteries+batt; int h = 10; stats_comp *comp = info->stats[STATS_BATTERY]+batt; @@ -156,7 +154,6 @@ void render_view_armor (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int armor, int lvl) { if (armor != -1) { - info_armor *arm = info->armors+armor; int h = 10; stats_comp *comp = info->stats[STATS_ARMOR]+armor; @@ -174,7 +171,6 @@ void render_view_armor_detail (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int armor, int lvl) { if (armor != -1) { - info_armor *arm = info->armors+armor; int h = 10; stats_comp *comp = info->stats[STATS_ARMOR]+armor; @@ -195,7 +191,6 @@ void render_view_weapon (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int weapon, int lvl) { if (weapon != -1) { - info_weapon *weap = info->weapons+weapon; int h = 10; stats_comp *comp = info->stats[STATS_WEAPONS]+weapon; @@ -215,7 +210,6 @@ void render_view_weapon_detail (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int weapon, int lvl) { if (weapon != -1) { - info_weapon *weap = info->weapons+weapon; int h = 10; stats_comp *comp = info->stats[STATS_WEAPONS]+weapon; @@ -236,7 +230,6 @@ void render_view_aug (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int aug, int lvl) { if (aug != -1) { - info_aug *augm = info->augs+aug; int h = 10; stats_comp *comp = info->stats[STATS_AUGS]+aug; @@ -254,7 +247,6 @@ void render_view_aug_detail (SDL_Renderer* rend, txtd *t, int px, int py, infos *info, int aug, int lvl) { if (aug != -1) { - info_aug *augm = info->augs+aug; int h = 10; stats_comp *comp = info->stats[STATS_AUGS]+aug; -- cgit v1.2.3-54-g00ecf