finish to reserve the use of draw_unit() to the drawing of units :)
(I even adapted the unused debug-highlights)
This commit is contained in:
parent
c1677e57d5
commit
8402f56acc
2 changed files with 5 additions and 6 deletions
|
@ -372,9 +372,8 @@ void game_display::draw(bool update,bool force)
|
|||
// draw cross images for debug highlights
|
||||
if(game_config::debug && debugHighlights_.count(*it)) {
|
||||
const surface cross(image::get_image(game_config::cross_image));
|
||||
if(cross != NULL) {
|
||||
draw_unit(xpos,ypos,cross,false,debugHighlights_[*it],0);
|
||||
}
|
||||
adjust_surface_alpha(cross, debugHighlights_[*it], true);
|
||||
tile_stack_append(cross);
|
||||
}
|
||||
|
||||
// Add the top layer overlay surfaces
|
||||
|
|
|
@ -1848,9 +1848,9 @@ void unit::redraw_unit(game_display& disp, const gamemap::location& loc)
|
|||
}
|
||||
|
||||
for(std::vector<std::string>::const_iterator ov = overlays().begin(); ov != overlays().end(); ++ov) {
|
||||
const surface img(image::get_image(*ov));
|
||||
if(img != NULL) {
|
||||
disp.draw_unit(xsrc, ysrc_adjusted, img);
|
||||
const surface ov_img(image::get_image(*ov));
|
||||
if(ov_img != NULL) {
|
||||
disp.video().blit_surface(xsrc, ysrc_adjusted, ov_img);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue