Skip to content

Commit

Permalink
Unit: fixed hp and xp colors having 0 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jul 31, 2017
1 parent 932ea1e commit 752508e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/units/unit.cpp
Expand Up @@ -1043,7 +1043,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);
Expand Down Expand Up @@ -1090,14 +1090,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<int>(experience_to_advance()) <= game_config::kill_experience;
const bool mid_advance = static_cast<int>(experience_to_advance()) <= game_config::kill_experience*2;
Expand Down

0 comments on commit 752508e

Please sign in to comment.