widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #13897
Re: [Merge] lp:~widelands-dev/widelands/bug-1696702-fuzzy-building-plots into lp:widelands
Can you give use some examples (screenshots?) what this looks like?
Do you have some save file with a lot of buildings so we can check this?
I asume testing this needs zoomin in and out followed by a ctrl-0
to com back no nominal zoom value?
Tried to review that code but I have no real idea what to check for.
Will check out and compile this once my last youtube upload is finally finished.
Diff comments:
>
> === modified file 'src/wui/interactive_base.cc'
> --- src/wui/interactive_base.cc 2018-05-13 07:15:39 +0000
> +++ src/wui/interactive_base.cc 2018-07-15 07:58:15 +0000
> @@ -464,6 +464,18 @@
> }
> }
>
> +void InteractiveBase::blit_overlay(RenderTarget* dst, const Vector2i& position, const Image* image, const Vector2i& hotspot, float scale) {
Please add some comment here, I am lost
> + const Recti pixel_perfect_rect = Recti(position - hotspot * scale,
> + image->width() * scale, image->height() * scale);
> + dst->blitrect_scale(pixel_perfect_rect.cast<float>(),
> + image, Recti(0, 0, image->width(), image->height()), 1.f,
> + BlendMode::UseAlpha);
> +}
> +
> +void InteractiveBase::blit_field_overlay(RenderTarget* dst, const FieldsToDraw::Field& field, const Image* image, const Vector2i& hotspot, float scale) {
Please add some comment here, too
> + blit_overlay(dst, field.rendertarget_pixel.cast<int>(), image, hotspot, scale);
> +}
> +
> void InteractiveBase::mainview_move() {
> if (minimap_registry_.window) {
> minimap_->set_view(map_view_.view_area().rect());
--
https://code.launchpad.net/~widelands-dev/widelands/bug-1696702-fuzzy-building-plots/+merge/343070
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1696702-fuzzy-building-plots.
References