Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/animation_scaling into lp:widelands
> I'd like to finish the spritemaps first though. agreed. > I also think it will only be worth our effort once we have the bigger > textures exported from Blender. No, I think the benefits will be immediately visible once you use downscaled textures. It just looks better. > [representative image] okay, as long as you have it on the radar and we agree that it has to die eventually :) About this change: I am still unhappy about it... Sorry :/. Now we have a circular dependency between RenderTarget and Surface. I feel the semantics break down in animation::get_width() and height. We have two dimensions now: the "perceived" (logical) one and the images on disk ones (physical) - the drawing code only knows about the first, and Animation should be the only knowing about the other. Can we not simply scale the source rect whenever blit_data() is requested? Other solution would be to not expose Animation width/height and instead deal in all code with relative quantities - i.e. a source rect of {w:0.5, h:1, x:0.25, y:0.} would mean: use the full height of the texture, but only 50% of the width starting at 25%. Diff comments: > > === modified file 'src/graphic/animation.cc' > --- src/graphic/animation.cc 2016-10-26 10:56:02 + > +++ src/graphic/animation.cc 2016-11-16 08:32:51 + > @@ -144,9 +146,19 @@ > throw wexception("Animation is missing player > color file: %s", image_file.c_str()); > } > } > + > + if (table.has_key("scale")) { > + scale_ = table.get_double("scale"); > + if (scale_ <= 0.0f) { > + throw wexception( > +"Animation scale %f needs to be > 0.0f. > First image of this animation is %s", scale_, s/First image of/This animation has/ > +image_files_[0].c_str()); > + } > + } > + > assert(!image_files_.empty()); > assert(pc_mask_image_files_.size() == image_files_.size() || > pc_mask_image_files_.empty()); > - > + assert(scale_ > 0); > } catch (const LuaError& e) { > throw wexception("Error in animation table: %s", e.what()); > } > > === modified file 'src/graphic/rendertarget.h' > --- src/graphic/rendertarget.h2016-10-17 20:39:15 + > +++ src/graphic/rendertarget.h2016-11-16 08:32:51 + > @@ -130,9 +130,10 @@ > return offset_; > } > > + bool to_surface_geometry(Rectf* destination_rect, Rectf* source_rect) > const; Add a comment what this does? > + > protected: > bool clip(Rectf& r) const; > - bool to_surface_geometry(Rectf* destination_rect, Rectf* source_rect) > const; > > // Does the actual blitting. > void do_blit_animation(const Vector2f& dst, -- https://code.launchpad.net/~widelands-dev/widelands/animation_scaling/+merge/310718 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/animation_scaling. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/oars_appdata into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/oars_appdata into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/oars_appdata/+merge/309624 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/oars_appdata. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/oars_appdata into lp:widelands
Thanks - that error message was confusing me! @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/oars_appdata/+merge/309624 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/oars_appdata. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/oars_appdata into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/oars_appdata into lp:widelands has been updated. Commit Message changed to: Added age ratings to Appdata https://odrs.gnome.org/oars and validator call to utils/uppdate_appdata.py. Fixed localization format for long description. Fixed id tag. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/oars_appdata/+merge/309624 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/oars_appdata. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/animation_scaling into lp:widelands
Review: Resubmit Good idea about the mipmaps - I'd like to finish the spritemaps first though. I also think it will only be worth our effort once we have the bigger textures exported from Blender. The representative_image in Lua is indeed needed for the font renderers. I really don't want to implement a new tag parameter into 2 font renderers for this right now. I have wanted Animation::representative_image_filename() to be gone for a while now so that we can have player colors on it too, but it will take some time until we get there. Since this function is only ever called for the idle animation, I decided to have the extra representative_image in MapObjectDescr rather than in the animation class. -- https://code.launchpad.net/~widelands-dev/widelands/animation_scaling/+merge/310718 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/animation_scaling. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp