mail[Wesnoth-commits] r14103 - in /trunk/src: menu_events.cpp playsingle_controller.cpp playturn.cpp reports.cpp


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

Header


Content

Posted by edb on October 28, 2006 - 22:45:
Author: edb
Date: Sat Oct 28 22:44:28 2006
New Revision: 14103

URL: http://svn.gna.org/viewcvs/wesnoth?rev=14103&view=rev
Log:
more current_player() stuff

Modified:
    trunk/src/menu_events.cpp
    trunk/src/playsingle_controller.cpp
    trunk/src/playturn.cpp
    trunk/src/reports.cpp

Modified: trunk/src/menu_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=14103&r1=14102&r2=14103&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Sat Oct 28 22:44:28 2006
@@ -218,15 +218,8 @@
                        //add player's name to title of dialog
                        std::stringstream str;
                        str <<  _("Statistics") << " (";
-                       // Find leader (of viewing player) 's description
-                       for (unit_map::const_iterator i = units_.begin(); i 
!= units_.end(); ++i) {
-                               if (i->second.side() != 
(gui_->viewing_team()+1))
-                                       continue;
-                               if (i->second.can_recruit()){
-                                       str << i->second.description();
-                                       break;
-                               }
-                       }
+                       // Current Player name
+                       str << teams_[gui_->viewing_team()].current_player();
                        str << ")";
 
                        statistics_dialog stats_dialog(*gui_, str.str());

Modified: trunk/src/playsingle_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=14103&r1=14102&r2=14103&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Sat Oct 28 22:44:28 2006
@@ -299,7 +299,7 @@
                                                        report << "\n";
                                                }
 
-                                               report << font::BOLD_TEXT << 
i->save_id() << "\n";
+                                               report << font::BOLD_TEXT << 
i->current_player() << "\n";
                                        }
 
                                        report << _("Remaining gold: ")

Modified: trunk/src/playturn.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playturn.cpp?rev=14103&r1=14102&r2=14103&view=diff
==============================================================================
--- trunk/src/playturn.cpp (original)
+++ trunk/src/playturn.cpp Sat Oct 28 22:44:28 2006
@@ -209,12 +209,12 @@
                                        //if this is an ally of the dropping 
side and it is not us (choose local player
                                        //if you want that) and not ai or 
empty and if it is not the dropping side itself,
                                        //get this team in as well
-                                       options.push_back(_("Replace with ") 
+ team->save_id());
+                                       options.push_back(_("Replace with ") 
+ team->current_player());
                                        allies.push_back(&(*team));
                                }
                        }
 
-                       const std::string msg = leader->second.description() 
+ " " + _("has left the game. What do you want to do?");
+                       const std::string msg = 
teams_[side_index].current_player() + " " + _("has left the game. What do you 
want to do?");
                        action = 
gui::show_dialog2(gui_,NULL,"",msg,gui::OK_ONLY,&options);
                }
 

Modified: trunk/src/reports.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/reports.cpp?rev=14103&r1=14102&r2=14103&view=diff
==============================================================================
--- trunk/src/reports.cpp (original)
+++ trunk/src/reports.cpp Sat Oct 28 22:44:28 2006
@@ -312,7 +312,7 @@
        {
                const std::vector<Uint32>& old_rgb = 
u->second.team_rgb_range();
                color_range new_rgb = 
team::get_side_color_range(u->second.side());
-               
+
            return report("",image::locator(u->second.absolute_image(), 
new_rgb, old_rgb),"");
        }
        case UNIT_PROFILE:
@@ -450,8 +450,7 @@
                const std::vector<std::string> items = utils::split(flag);
                const std::vector<std::string> sub_items = 
utils::split(items[0], ':');
                image::locator flag_image(sub_items[0], new_rgb, old_rgb);
-               u = find_leader(units,playing_side);
-               return report("",flag_image,u != units.end() ? 
u->second.description() : "");
+               return 
report("",flag_image,teams[playing_side-1].current_player());
        }
 
        case OBSERVERS: {
@@ -494,7 +493,7 @@
                        sec = current_team.countdown_time() / 1000;
 
                        str << (current_side != playing_side ? 
font::GRAY_TEXT : font::NULL_MARKUP);
-                       
+
                        if(sec < 60)
                                str << "<200,0,0>";
                        else if(sec < 120)




Related Messages


Powered by MHonArc, Updated Sun Oct 29 05:20:10 2006