Author: esr
Date: Mon Jul 16 14:26:54 2007
New Revision: 18827

URL: http://svn.gna.org/viewcvs/wesnoth?rev=18827&view=rev
Log:
The hunk of code in this diff has the part that actually produced a
diaplay commented out.  It looks like somebody was trying to display 
the TOD bonus next to time for each mouseover hex but gave up on
the idea.

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=18827&r1=18826&r2=18827&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Mon Jul 16 14:26:54 2007
@@ -620,21 +620,10 @@
        display::draw_wrap(update, force, changed);
 }
 
-void game_display::draw_report(reports::TYPE report_num)
-{
-       if(!team_valid()) {
-               return;
-       }
-
+void game_display::refresh_report(reports::TYPE report_num, reports::report 
report)
+{
        const theme::status_item* const item = 
theme_.get_status_item(reports::report_name(report_num));
        if(item != NULL) {
-
-               reports::report report = 
reports::generate_report(report_num,report_,map_,
-                               units_, teams_,
-                     teams_[viewing_team()],
-                               size_t(currentTeam_+1),size_t(activeTeam_+1),
-                               selectedHex_,mouseoverHex_,status_,observers_);
-
                SDL_Rect& rect = reportRects_[report_num];
                const SDL_Rect& new_rect = item->location(screen_area());
 
@@ -756,26 +745,6 @@
                                        area.h = minimum<int>(rect.h + rect.y - 
y, img->h);
                                        draw_image_for_report(img, area);
 
-                                       // draw illuminated time
-                                       if(report_num == reports::TIME_OF_DAY 
&& img != NULL) {
-                                               time_of_day tod = 
timeofday_at(status_,units_,mouseoverHex_,map_);
-                                               // don't show illuminated time 
on fogged/shrouded tiles
-                                               if 
(teams_[viewing_team()].fogged(mouseoverHex_.x, mouseoverHex_.y) || 
-                                                               
teams_[viewing_team()].shrouded(mouseoverHex_.x, mouseoverHex_.y)) {
-
-                                                       tod = 
status_.get_time_of_day(false,mouseoverHex_);
-                                               }
-                                               if(tod.bonus_modified > 0) {
-                                                       surface 
tod_bright(image::get_image(game_config:: tod_bright_image,image::UNSCALED));
-                                                       if(tod_bright != NULL) {
-                                                               
draw_image_for_report(tod_bright,area);
-//                                                             
std::stringstream mod_str;
-//                                                             mod_str << "+" 
<< tod.bonus_modified << "%";
-//                                                             
font::draw_text(&screen_,rect,item->font_size(),font::DARK_COLOUR,mod_str.str(),area.x+2,area.y+2);
-                                                       }
-                                               }
-                                       }
-
                                        image_count++;
                                        if(area.h > tallest) {
                                                tallest = area.h;
@@ -806,6 +775,21 @@
        } else {
                reportSurfaces_[report_num].assign(NULL);
        }
+}
+
+void game_display::draw_report(reports::TYPE report_num)
+{
+       if(!team_valid()) {
+               return;
+       }
+
+       reports::report report = 
reports::generate_report(report_num,report_,map_,
+                                                         units_, teams_,
+                                                         
teams_[viewing_team()],
+                                                         
size_t(currentTeam_+1),size_t(activeTeam_+1),
+                                                         
selectedHex_,mouseoverHex_,status_,observers_);
+
+       refresh_report(report_num, report);
 }
 
 void game_display::draw_game_status()


_______________________________________________
Wesnoth-commits mailing list
Wesnoth-commits@gna.org
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to