mail[Wesnoth-commits] r33266 - in /trunk/src: display.cpp display.hpp game_display.cpp game_display.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by jeremy . rosen on March 01, 2009 - 21:19:
Author: boucman
Date: Sun Mar  1 21:19:58 2009
New Revision: 33266

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33266&view=rev
Log:
prevent black strips from beheading units

Modified:
    trunk/src/display.cpp
    trunk/src/display.hpp
    trunk/src/game_display.cpp
    trunk/src/game_display.hpp

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=33266&r1=33265&r2=33266&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Sun Mar  1 21:19:58 2009
@@ -104,6 +104,7 @@
        report_(),
        buttons_(),
        invalidated_(),
+       previous_invalidated_(),
        hex_overlay_(),
        selected_hex_overlay_(0),
        mouseover_hex_overlay_(0),
@@ -1887,6 +1888,16 @@
        invalidate_animations();
        pre_draw();
        update_time_of_day();
+       // at this stage we have everything that needs to be invalidated for 
this redraw
+       // save it as the previous invalidated, and merge with the previous 
invalidated_
+       previous_invalidated_.swap(invalidated_);
+       
invalidated_.insert(previous_invalidated_.begin(),previous_invalidated_.end());
+       // call invalidate_animation again to deal with new conflict arising 
from the merge
+       // no conflict, if a hex was invalidated last turn but not this turn, 
then
+       // * case of no unit in neighbour hex=> no propagation
+       // * case of unit in hex but was there last turn=>its hexes are 
invalidated too
+       // * case of unit inhex not there last turn => it moved, so was 
invalidated previously
+       //invalidate_animations();
        if(!get_map().empty()) {
                //int simulate_delay = 0;
 

Modified: trunk/src/display.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.hpp?rev=33266&r1=33265&r2=33266&view=diff
==============================================================================
--- trunk/src/display.hpp (original)
+++ trunk/src/display.hpp Sun Mar  1 21:19:58 2009
@@ -590,6 +590,7 @@
        std::map<reports::TYPE, std::string> report_;
        std::vector<gui::button> buttons_;
        std::set<map_location> invalidated_;
+       std::set<map_location> previous_invalidated_;
        std::map<map_location, surface> hex_overlay_;
        surface selected_hex_overlay_;
        surface mouseover_hex_overlay_;

Modified: trunk/src/game_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=33266&r1=33265&r2=33266&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Sun Mar  1 21:19:58 2009
@@ -67,8 +67,7 @@
                reach_map_old_(),
                reach_map_changed_(true),
                game_mode_(RUNNING),
-               flags_(),
-               previous_invalidated_()
+               flags_()
 {
        singleton_ = this;
 
@@ -258,16 +257,6 @@
 }
 
 void game_display::pre_draw() {
-       // at this stage we have everything that needs to be invalidated for 
this redraw
-       // save it as the previous invalidated, and merge with the previous 
invalidated_
-       previous_invalidated_.swap(invalidated_);
-       
invalidated_.insert(previous_invalidated_.begin(),previous_invalidated_.end());
-       // call invalidate_animation again to deal with new conflict arising 
from the merge
-       // no conflict, if a hex was invalidated last turn but not this turn, 
then
-       // * case of no unit in neighbour hex=> no propagation
-       // * case of unit in hex but was there last turn=>its hexes are 
invalidated too
-       // * case of unit inhex not there last turn => it moved, so was 
invalidated previously
-       //invalidate_animations();
        process_reachmap_changes();
        /**
         * @todo FIXME: must modify changed, but best to do it at the

Modified: trunk/src/game_display.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.hpp?rev=33266&r1=33265&r2=33266&view=diff
==============================================================================
--- trunk/src/game_display.hpp (original)
+++ trunk/src/game_display.hpp Sun Mar  1 21:19:58 2009
@@ -392,7 +392,6 @@
         * the tiles invalidated at last redraw,
         * to simplify the cleaning up of tiles left by units
         */
-       std::set<map_location> previous_invalidated_;
        static game_display * singleton_;
 };
 




Related Messages


Powered by MHonArc, Updated Sun Mar 01 21:40:05 2009