From 721e2d7e9e24001e722e3a7d7df7955d89f72cdf Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 12 Jun 2017 02:10:34 +1100 Subject: [PATCH] Unit: fixed hp and xp colors having 0 alpha --- src/units/unit.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/units/unit.cpp b/src/units/unit.cpp index 3c17c811a48a..869397bcd627 100644 --- a/src/units/unit.cpp +++ b/src/units/unit.cpp @@ -1044,7 +1044,7 @@ const std::string& unit::flag_rgb() const static color_t hp_color_impl(int hitpoints, int max_hitpoints) { double unit_energy = 0.0; - color_t energy_color {0,0,0,0}; + color_t energy_color {0,0,0,255}; if(max_hitpoints > 0) { unit_energy = double(hitpoints)/double(max_hitpoints); @@ -1091,14 +1091,14 @@ color_t unit::hp_color(int new_hitpoints) const color_t unit::xp_color() const { - const color_t near_advance_color {255,255,255,0}; - const color_t mid_advance_color {150,255,255,0}; - const color_t far_advance_color {0,205,205,0}; - const color_t normal_color {0,160,225,0}; - const color_t near_amla_color {225,0,255,0}; - const color_t mid_amla_color {169,30,255,0}; - const color_t far_amla_color {139,0,237,0}; - const color_t amla_color {170,0,255,0}; + const color_t near_advance_color {255,255,255,255}; + const color_t mid_advance_color {150,255,255,255}; + const color_t far_advance_color {0,205,205,255}; + const color_t normal_color {0,160,225,255}; + const color_t near_amla_color {225,0,255,255}; + const color_t mid_amla_color {169,30,255,255}; + const color_t far_amla_color {139,0,237,255}; + const color_t amla_color {170,0,255,255}; const bool near_advance = static_cast(experience_to_advance()) <= game_config::kill_experience; const bool mid_advance = static_cast(experience_to_advance()) <= game_config::kill_experience*2;