Author: tschmitz
Date: Fri Aug 19 01:39:56 2011
New Revision: 50847

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50847&view=rev
Log:
Changed manager::draw_hex().

Modified:
    trunk/src/whiteboard/manager.cpp

Modified: trunk/src/whiteboard/manager.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/manager.cpp?rev=50847&r1=50846&r2=50847&view=diff
==============================================================================
--- trunk/src/whiteboard/manager.cpp (original)
+++ trunk/src/whiteboard/manager.cpp Fri Aug 19 01:39:56 2011
@@ -418,10 +418,7 @@
                friend class enable_visit_all<draw_visitor>;
 
        public:
-               draw_visitor(map_location const& hex, side_actions::numbers_t& 
numbers)
-                               : hex_(hex)
-                               , numbers_(numbers)
-                       {}
+               draw_visitor(map_location const& hex): hex_(hex) {}
 
                using enable_visit_all<draw_visitor>::visit_all;
 
@@ -430,11 +427,9 @@
                bool visit(size_t /*team_index*/, team&, side_actions&, 
side_actions::iterator itor)
                        { (*itor)->draw_hex(hex_);   return true; }
                //using default pre_visit_team()
-               bool post_visit_team(size_t /*team_index*/, team&, 
side_actions& sa)
-                       { sa.get_numbers(hex_,numbers_);   return true; }
+               //using default post_visit_team()
 
                map_location const& hex_;
-               side_actions::numbers_t& numbers_;
        };
 }
 
@@ -442,11 +437,17 @@
 {
        if (!wait_for_side_init_)
        {
+               //call draw() for all actions
+               draw_visitor(hex).visit_all();
+
                //Info about the action numbers to be displayed on screen.
                side_actions::numbers_t numbers;
-
-               draw_visitor(hex,numbers).visit_all();
-
+               foreach(team& t, *resources::teams)
+               {
+                       side_actions& sa = *t.get_side_actions();
+                       if(!sa.hidden())
+                               sa.get_numbers(hex,numbers);
+               }
                draw_numbers(hex,numbers); //< helper fcn
        }
 


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

Reply via email to