Author: alink
Date: Sun Apr 12 14:49:30 2009
New Revision: 34779

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34779&view=rev
Log:
Tiny optimization of frequently changing/moving big unit (like shadow)

Modified:
    trunk/src/unit_frame.cpp

Modified: trunk/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Sun Apr 12 14:49:30 2009
@@ -493,10 +493,9 @@
                        const int y = static_cast<int>(tmp_offset * ydst + 
(1.0-tmp_offset) * ysrc)+current_data.y+d2-(image->h/2);
                        const SDL_Rect r = {x,y,image->w,image->h};
                        // check if our underlying hexes are invalidated
-                       bool rect_need_update = disp->rectangle_need_update(r);
                        // if we need to update ourselve because we changed, 
invalidate our hexes
                        // and return whether or not our hexs was invalidated
-                       if(force || need_update() || rect_need_update) {
+                       if(force || need_update() || 
disp->rectangle_need_update(r)) {
                                // invalidate ouself to be called at redraw time
                                result |= disp->invalidate(src);
                                result |= 
disp->invalidate_visible_locations_in_rect(r);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to