Author: boucman
Date: Sun May 10 01:01:04 2009
New Revision: 35518

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35518&view=rev
Log:
revert r35501, this introduces bugs for large animations. The underlying perf 
problem is still there and need further fixing

Modified:
    trunk/src/game_display.cpp

Modified: trunk/src/game_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=35518&r1=35517&r2=35518&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Sun May 10 01:01:04 2009
@@ -887,24 +887,18 @@
 {
        new_animation_frame();
        display::invalidate_animations();
-       for (unit_map::iterator u = units_.begin(),
-            u_end = units_.end(); u != u_end; ++u)
-       {
-               if (!tile_nearly_on_screen(u->first)) continue;
-               u->second.refresh(*this, u->first);
-       }
-       if (temp_unit_ && tile_nearly_on_screen(temp_unit_loc_))
+       unit_map::iterator unit;
+       for(unit=units_.begin() ; unit != units_.end() ; unit++)
+               unit->second.refresh(*this, unit->first);
+       if (temp_unit_ )
                temp_unit_->refresh(*this, temp_unit_loc_);
        bool new_inval = true;
        while(new_inval) {
                new_inval = false;
-               for (unit_map::iterator u = units_.begin(),
-                    u_end = units_.end(); u != u_end; ++u)
-               {
-                       if (!tile_nearly_on_screen(u->first)) continue;
-                       new_inval |= u->second.invalidate(u->first);
-               }
-               if (temp_unit_ && tile_nearly_on_screen(temp_unit_loc_)) {
+               for(unit=units_.begin() ; unit != units_.end() ; unit++) {
+                       new_inval |= unit->second.invalidate(unit->first);
+               }
+               if (temp_unit_ ) {
                        //new_inval |=invalidate(temp_unit_loc_);
                        new_inval |=temp_unit_->invalidate(temp_unit_loc_);
                }


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

Reply via email to