Revert "Anchor unit overlays to the topleft corner of the sprite."
This reverts commit 8f49cbad55
.
This commit breaks the game when you zoom in, since I'm trying to
make changes to how that works it is inconvenient to have to deal
with it right now. This bug was assigned to lipk more than a month
ago when he first introduced it.
Conflicts:
changelog
src/unit_drawer.cpp
This commit is contained in:
parent
8932fda902
commit
760cb18b3e
3 changed files with 5 additions and 11 deletions
|
@ -348,7 +348,6 @@ Version 1.13.0-dev:
|
|||
* Fix bug #21298: Minimap shows invisible overlays
|
||||
* Replaced "Disable notifications" in Preferences -> Advanced with a new
|
||||
"Desktop notifications" option that defaults to enabled.
|
||||
* Align unit overlays to the sprite rather than the occupied hex.
|
||||
* Remove carryover WML (this may make a reappearance in 1.13.0 but it is
|
||||
considered premature now, please see github PR discussion for more info)
|
||||
* Fix bug #22465: Minimap not redrawn after turn dialog.
|
||||
|
|
|
@ -112,8 +112,6 @@ Version 1.13.0-dev:
|
|||
* Autogenerate help pages for all eras and factions.
|
||||
* Help pages for a faction autogenerates a list of races and alignments that appear in that faction.
|
||||
* Make nice help descriptions for the default factions (using content from the wiki).
|
||||
* Align unit overlays to the sprite rather than the occupied hex.
|
||||
|
||||
|
||||
Version 1.11.11:
|
||||
* Campaigns:
|
||||
|
|
|
@ -250,9 +250,6 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
#endif
|
||||
if(draw_bars) {
|
||||
const image::locator* orb_img = NULL;
|
||||
const surface unit_img = image::get_image(u.default_anim_image());
|
||||
const int xoff = (hex_size - unit_img->w)/2;
|
||||
const int yoff = (hex_size - unit_img->h)/2;
|
||||
/*static*/ const image::locator partmoved_orb(game_config::images::orb + "~RC(magenta>" +
|
||||
preferences::partial_color() + ")" );
|
||||
/*static*/ const image::locator moved_orb(game_config::images::orb + "~RC(magenta>" +
|
||||
|
@ -299,7 +296,7 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
if (orb_img != NULL) {
|
||||
surface orb(image::get_image(*orb_img,image::SCALED_TO_ZOOM));
|
||||
disp.drawing_buffer_add(display::LAYER_UNIT_BAR,
|
||||
loc, xsrc + xoff, ysrc + adjusted_params.y + yoff, orb);
|
||||
loc, xsrc, ysrc +adjusted_params.y, orb);
|
||||
}
|
||||
|
||||
double unit_energy = 0.0;
|
||||
|
@ -311,7 +308,7 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
|
||||
const fixed_t bar_alpha = (loc == mouse_hex || loc == sel_hex) ? ftofxp(1.0): ftofxp(0.8);
|
||||
|
||||
draw_bar(*energy_file, xsrc+bar_shift+xoff, ysrc + adjusted_params.y + yoff,
|
||||
draw_bar(*energy_file, xsrc+bar_shift, ysrc +adjusted_params.y,
|
||||
loc, hp_bar_height, unit_energy,hp_color, bar_alpha);
|
||||
|
||||
if(experience > 0 && can_advance) {
|
||||
|
@ -319,7 +316,7 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
|
||||
const int xp_bar_height = static_cast<int>(max_experience * u.xp_bar_scaling() / std::max<int>(u.level(),1));
|
||||
|
||||
draw_bar(*energy_file, xsrc + xoff, ysrc + adjusted_params.y + yoff,
|
||||
draw_bar(*energy_file, xsrc, ysrc +adjusted_params.y,
|
||||
loc, xp_bar_height, filled, xp_color, bar_alpha);
|
||||
}
|
||||
|
||||
|
@ -330,7 +327,7 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
// crown = adjust_surface_alpha(crown, bar_alpha);
|
||||
//}
|
||||
disp.drawing_buffer_add(display::LAYER_UNIT_BAR,
|
||||
loc, xsrc + xoff, ysrc +adjusted_params.y + yoff, crown);
|
||||
loc, xsrc, ysrc +adjusted_params.y, crown);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -339,7 +336,7 @@ void unit_drawer::redraw_unit (const unit & u) const
|
|||
const sdl::timage ov_img(image::get_texture(*ov, image::SCALED_TO_ZOOM));
|
||||
if(!ov_img.null()) {
|
||||
disp.drawing_buffer_add(display::LAYER_UNIT_BAR,
|
||||
loc, xsrc + xoff, ysrc + adjusted_params.y + yoff, ov_img);
|
||||
loc, xsrc, ysrc +adjusted_params.y, ov_img);
|
||||
}
|
||||
#else
|
||||
const surface ov_img(image::get_image(*ov, image::SCALED_TO_ZOOM));
|
||||
|
|
Loading…
Add table
Reference in a new issue