Remove some long-since dead ellipse recoloring code.
This commit is contained in:
parent
79d089d5b8
commit
631e21c8de
1 changed files with 5 additions and 8 deletions
13
src/unit.cpp
13
src/unit.cpp
|
@ -1746,19 +1746,16 @@ void unit::redraw_unit(game_display& disp,gamemap::location hex)
|
|||
surface ellipse_front(NULL);
|
||||
surface ellipse_back(NULL);
|
||||
if(preferences::show_side_colours() && draw_bars_) {
|
||||
const char* const selected = disp.selected_hex() == hex ? "selected-" : "";
|
||||
std::vector<Uint32> temp_rgb;
|
||||
//ellipse not pure red=255!
|
||||
for(int i=255;i>100;i--){
|
||||
temp_rgb.push_back((Uint32)(i<<16));
|
||||
}
|
||||
//selected ellipse not pure red at all!
|
||||
char buf[100];
|
||||
|
||||
std::string ellipse=image_ellipse();
|
||||
if(ellipse.empty()){
|
||||
ellipse="misc/ellipse";
|
||||
}
|
||||
|
||||
const char* const selected = disp.selected_hex() == hex ? "selected-" : "";
|
||||
|
||||
// load the ellipse parts recolored to match team color
|
||||
char buf[100];
|
||||
std::string tc=team::get_side_colour_index(side_);
|
||||
|
||||
snprintf(buf,sizeof(buf),"%s-%stop.png~RC(ellipse_red>%s)",ellipse.c_str(),selected,tc.c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue