Skip to content

Commit

Permalink
Hud.h:
Browse files Browse the repository at this point in the history
* Hopefully fixes some of the windows warnings.
  • Loading branch information
razterizer committed Oct 1, 2024
1 parent 3b5b3a6 commit 71ef1c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pilot_Episode/Hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ void draw_hud(SpriteHandler<NR, NC>& sh,
case 0: health_char = ""; break;
}
std::string life_str = "H: ["
+ str::rep_char('#', std::floor(health/3.f))
+ str::rep_char('#', static_cast<int>(std::floor<float>(health/3.f)))
+ health_char
+ str::rep_char(' ', std::ceil(max_health/3.f) - std::ceil(health/3.f))
+ str::rep_char(' ', static_cast<int>(std::ceil<float>(max_health/3.f) - std::ceil<float>(health/3.f)))
+ "]";
sh.write_buffer(life_str, 0, hud_c, Color::Cyan);
//sh.write_buffer(std::to_string(health), 5, 5, Color::Black);
Expand Down

0 comments on commit 71ef1c1

Please sign in to comment.