wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src about.cpp dialogs.cpp display.cpp f...


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src about.cpp dialogs.cpp display.cpp f...
Date: Tue, 15 Mar 2005 15:01:31 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    05/03/15 20:01:31

Modified files:
        src            : about.cpp dialogs.cpp display.cpp font.cpp 
                         font.hpp game.cpp intro.cpp intro.hpp 
                         mapgen_dialog.cpp multiplayer_connect.cpp 
                         multiplayer_create.cpp multiplayer_wait.cpp 
                         preferences.cpp show_dialog.cpp show_dialog.hpp 
                         titlescreen.cpp tooltips.cpp tooltips.hpp 
        src/editor     : editor_dialogs.cpp 
        src/widgets    : button.cpp label.cpp menu.cpp progressbar.cpp 

Log message:
        cleanup of deps against display: fonts do not need a display at all

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/about.cpp.diff?tr1=1.103&tr2=1.104&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.87&tr2=1.88&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.296&tr2=1.297&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/font.cpp.diff?tr1=1.120&tr2=1.121&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/font.hpp.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.205&tr2=1.206&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/intro.cpp.diff?tr1=1.68&tr2=1.69&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/intro.hpp.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/mapgen_dialog.cpp.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.120&tr2=1.121&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_create.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_wait.cpp.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/preferences.cpp.diff?tr1=1.142&tr2=1.143&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/show_dialog.cpp.diff?tr1=1.113&tr2=1.114&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/show_dialog.hpp.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/titlescreen.cpp.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/tooltips.cpp.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/tooltips.hpp.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/editor/editor_dialogs.cpp.diff?tr1=1.24&tr2=1.25&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/button.cpp.diff?tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/label.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/menu.cpp.diff?tr1=1.80&tr2=1.81&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/progressbar.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: wesnoth/src/about.cpp
diff -u wesnoth/src/about.cpp:1.103 wesnoth/src/about.cpp:1.104
--- wesnoth/src/about.cpp:1.103 Fri Mar 11 14:15:50 2005
+++ wesnoth/src/about.cpp       Tue Mar 15 20:01:30 2005
@@ -1,4 +1,4 @@
-/* $Id: about.cpp,v 1.103 2005/03/11 14:15:50 ettin Exp $ */
+/* $Id: about.cpp,v 1.104 2005/03/15 20:01:30 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -382,7 +382,7 @@
                int cur_line = 0;
 
                do {
-                       SDL_Rect tr = 
font::draw_text(&disp,disp.screen_area(),font::SIZE_XLARGE,font::BLACK_COLOUR,
+                       SDL_Rect tr = 
font::draw_text(&disp.video(),screen_area(),font::SIZE_XLARGE,font::BLACK_COLOUR,
                                                      text[line], map_rect.x + 
map_rect.w / 8,y);
                        if(is_new_line) {
                                is_new_line = false;
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.87 wesnoth/src/dialogs.cpp:1.88
--- wesnoth/src/dialogs.cpp:1.87        Thu Mar 10 21:42:04 2005
+++ wesnoth/src/dialogs.cpp     Tue Mar 15 20:01:30 2005
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.87 2005/03/10 21:42:04 ydirson Exp $ */
+/* $Id: dialogs.cpp,v 1.88 2005/03/15 20:01:30 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -390,7 +390,7 @@
                }
        }
 
-       font::draw_text(&disp(), area, font::SIZE_SMALL, font::NORMAL_COLOUR, 
str.str(), area.x, ypos, true);
+       font::draw_text(&disp().video(), area, font::SIZE_SMALL, 
font::NORMAL_COLOUR, str.str(), area.x, ypos, true);
 }
 
 } //end anon namespace
@@ -637,7 +637,7 @@
                desc << font::NORMAL_TEXT << u.description();
                const std::string description = desc.str();
                description_rect = 
font::text_area(description,font::SIZE_NORMAL);
-               description_rect = 
font::draw_text(&disp(),area,font::SIZE_NORMAL,font::NORMAL_COLOUR,desc.str(),right_align
 ? image_rect.x : image_rect.x + image_rect.w - 
description_rect.w,image_rect.y+image_rect.h+details_button_.location().h);
+               description_rect = 
font::draw_text(&disp().video(),area,font::SIZE_NORMAL,font::NORMAL_COLOUR,desc.str(),right_align
 ? image_rect.x : image_rect.x + image_rect.w - 
description_rect.w,image_rect.y+image_rect.h+details_button_.location().h);
        }
 
        std::stringstream details;
@@ -716,7 +716,7 @@
                        xpos = cur_area.x + cur_area.w - line_area.w;
                }
 
-               cur_area = 
font::draw_text(&disp(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,xpos,cur_area.y);
+               cur_area = 
font::draw_text(&disp().video(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,xpos,cur_area.y);
                cur_area.y += cur_area.h;
        }
 }
@@ -779,7 +779,7 @@
        SDL_Rect txt_area = { area.x+campaign_preview_border,area.y,0,0 };
 
        for(std::vector<std::string>::const_iterator line = lines.begin(); line 
!= lines.end(); ++line) {
-               txt_area = 
font::draw_text(&disp(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,txt_area.x,txt_area.y);
+         txt_area = 
font::draw_text(&disp().video(),location(),font::SIZE_SMALL,font::NORMAL_COLOUR,*line,txt_area.x,txt_area.y);
                txt_area.y += txt_area.h;
        }
 
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.296 wesnoth/src/display.cpp:1.297
--- wesnoth/src/display.cpp:1.296       Mon Mar 14 22:26:38 2005
+++ wesnoth/src/display.cpp     Tue Mar 15 20:01:30 2005
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.296 2005/03/14 22:26:38 gruikya Exp $ */
+/* $Id: display.cpp,v 1.297 2005/03/15 20:01:30 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -567,13 +567,13 @@
        }
 }
 
-void draw_label(display& disp, surface target, const theme::label& label)
+void draw_label(CVideo& video, surface target, const theme::label& label)
 {
        //log_scope("draw label");
 
        const std::string& text = label.text();
        const std::string& icon = label.icon();
-       SDL_Rect& loc = label.location(disp.screen_area());
+       SDL_Rect& loc = label.location(screen_area());
        
        if(icon.empty() == false) {
                surface surf(image::get_image(icon,image::UNSCALED));
@@ -587,7 +587,7 @@
                        tooltips::add_tooltip(loc,text);
                }
        } else if(text.empty() == false) {
-               
font::draw_text(&disp,loc,label.font_size(),font::NORMAL_COLOUR,text,loc.x,loc.y);
+               
font::draw_text(&video,loc,label.font_size(),font::NORMAL_COLOUR,text,loc.x,loc.y);
        }
 
 
@@ -613,7 +613,7 @@
 
                const std::vector<theme::label>& labels = theme_.labels();
                for(std::vector<theme::label>::const_iterator i = 
labels.begin(); i != labels.end(); ++i) {
-                       draw_label(*this,screen,*i);
+                       draw_label(video(),screen,*i);
                }
                
                //invalidate the reports so they are redrawn
@@ -865,7 +865,7 @@
                        for(reports::report::iterator i = report.begin(); i != 
report.end(); ++i) {
                                if(i->text.empty() == false) {
                                        // Draw a text element
-                                       area = 
font::draw_text(this,rect,item->font_size(),font::NORMAL_COLOUR,i->text,x,y);
+                                       area = 
font::draw_text(&screen_,rect,item->font_size(),font::NORMAL_COLOUR,i->text,x,y);
                                        if(area.h > tallest) tallest = area.h;
                                        if(i->text[i->text.size() - 1] == '\n') 
{
                                                x = rect.x;
@@ -1017,7 +1017,7 @@
        //with on the right-side panel
        const size_t font_size = this->y() >= 700 ? 13 : 10;
 
-       description_rect = 
font::draw_text(this,clipRect,font_size,font::NORMAL_COLOUR,
+       description_rect = 
font::draw_text(&screen_,clipRect,font_size,font::NORMAL_COLOUR,
                                           details.str(),x,y);
 
        update_rect(description_rect);
@@ -1608,15 +1608,15 @@
                const int y = yloc + zoom_/2 - text_area.h/2;
 
                //draw the text with a black outline
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y-1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y+1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y-1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y-1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y+1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y+1);
-               
font::draw_text(this,rect,font::SIZE_LARGE,font::YELLOW_COLOUR,str,x,y);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y-1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x-1,y+1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y-1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y-1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x+1,y+1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::DARK_COLOUR,str,x,y+1);
+               
font::draw_text(&screen_,rect,font::SIZE_LARGE,font::YELLOW_COLOUR,str,x,y);
        }
 }
 
Index: wesnoth/src/editor/editor_dialogs.cpp
diff -u wesnoth/src/editor/editor_dialogs.cpp:1.24 
wesnoth/src/editor/editor_dialogs.cpp:1.25
--- wesnoth/src/editor/editor_dialogs.cpp:1.24  Thu Mar 10 21:42:10 2005
+++ wesnoth/src/editor/editor_dialogs.cpp       Tue Mar 15 20:01:31 2005
@@ -70,15 +70,15 @@
 
        gui::draw_dialog_frame(xpos,ypos,width,height,disp);
 
-       SDL_Rect title_rect = 
font::draw_text(NULL,disp.screen_area(),24,font::NORMAL_COLOUR,
+       SDL_Rect title_rect = 
font::draw_text(NULL,screen_area(),24,font::NORMAL_COLOUR,
                                              _("Create New Map"),0,0);
 
        const std::string& width_label = _("Width:");
        const std::string& height_label = _("Height:");
 
-       SDL_Rect width_rect = font::draw_text(NULL, disp.screen_area(), 14, 
font::NORMAL_COLOUR,
+       SDL_Rect width_rect = font::draw_text(NULL, screen_area(), 14, 
font::NORMAL_COLOUR,
                                                                                
  width_label, 0, 0);
-       SDL_Rect height_rect = font::draw_text(NULL, disp.screen_area(), 14, 
font::NORMAL_COLOUR,
+       SDL_Rect height_rect = font::draw_text(NULL, screen_area(), 14, 
font::NORMAL_COLOUR,
                                                                                
   height_label, 0, 0);
 
        const int text_right = xpos + horz_margin +
@@ -191,23 +191,23 @@
                        map_width = width_slider.value();
                        map_height = height_slider.value();
                        gui::draw_dialog_frame(xpos,ypos,width,height,disp);
-                       title_rect = 
font::draw_text(&disp,disp.screen_area(),24,font::NORMAL_COLOUR,
+                       title_rect = 
font::draw_text(&disp.video(),screen_area(),24,font::NORMAL_COLOUR,
                                                                                
 _("Create New Map"),
                                                                                
 xpos+(width-title_rect.w)/2,ypos+10);
 
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,
                                                        
width_label,width_rect.x,width_rect.y);
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,
                                                        
height_label,height_rect.x,height_rect.y);
                        
                        std::stringstream width_str;
                        width_str << map_width;
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,width_str.str(),
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,width_str.str(),
                                                        
slider_right+horz_margin,width_rect.y);
                        
                        std::stringstream height_str;
                        height_str << map_height;
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,height_str.str(),
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,height_str.str(),
                                                        
slider_right+horz_margin,height_rect.y);
                        
                }
@@ -325,10 +325,10 @@
                        hotkeys_button.set_dirty();
                        scroll_slider.set_dirty();
 
-                       
font::draw_text(&disp,clip_rect,14,font::NORMAL_COLOUR,scroll_label,
+                       
font::draw_text(&disp.video(),clip_rect,14,font::NORMAL_COLOUR,scroll_label,
                                scroll_rect.x,scroll_rect.y);
 
-                       update_rect(disp.screen_area());
+                       update_rect(screen_area());
 
                        redraw_all = false;
                }
@@ -384,15 +384,15 @@
 
        gui::draw_dialog_frame(xpos,ypos,width,height,disp);
 
-       SDL_Rect title_rect = 
font::draw_text(NULL,disp.screen_area(),24,font::NORMAL_COLOUR,
+       SDL_Rect title_rect = 
font::draw_text(NULL,screen_area(),24,font::NORMAL_COLOUR,
                                              _("Resize Map"),0,0);
 
        const std::string& width_label = _("Width:");
        const std::string& height_label = _("Height:");
 
-       SDL_Rect width_rect = font::draw_text(NULL, disp.screen_area(), 14, 
font::NORMAL_COLOUR,
+       SDL_Rect width_rect = font::draw_text(NULL, screen_area(), 14, 
font::NORMAL_COLOUR,
                                                                                
  width_label, 0, 0);
-       SDL_Rect height_rect = font::draw_text(NULL, disp.screen_area(), 14, 
font::NORMAL_COLOUR,
+       SDL_Rect height_rect = font::draw_text(NULL, screen_area(), 14, 
font::NORMAL_COLOUR,
                                                                                
   height_label, 0, 0);
 
        const int text_right = xpos + horz_margin +
@@ -444,23 +444,23 @@
                        map_width = width_slider.value();
                        map_height = height_slider.value();
                        gui::draw_dialog_frame(xpos,ypos,width,height,disp);
-                       title_rect = 
font::draw_text(&disp,disp.screen_area(),24,font::NORMAL_COLOUR,
+                       title_rect = 
font::draw_text(&disp.video(),screen_area(),24,font::NORMAL_COLOUR,
                                                                                
 _("Resize Map"),
                                                                                
 xpos+(width-title_rect.w)/2,ypos+10);
 
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,
                                                        
width_label,width_rect.x,width_rect.y);
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,
                                                        
height_label,height_rect.x,height_rect.y);
                        
                        std::stringstream width_str;
                        width_str << map_width;
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,width_str.str(),
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,width_str.str(),
                                                        
slider_right+horz_margin,width_rect.y);
                        
                        std::stringstream height_str;
                        height_str << map_height;
-                       
font::draw_text(&disp,disp.screen_area(),14,font::NORMAL_COLOUR,height_str.str(),
+                       
font::draw_text(&disp.video(),screen_area(),14,font::NORMAL_COLOUR,height_str.str(),
                                                        
slider_right+horz_margin,height_rect.y);
                        
                }
Index: wesnoth/src/font.cpp
diff -u wesnoth/src/font.cpp:1.120 wesnoth/src/font.cpp:1.121
--- wesnoth/src/font.cpp:1.120  Thu Mar 10 22:29:57 2005
+++ wesnoth/src/font.cpp        Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: font.cpp,v 1.120 2005/03/10 22:29:57 ydirson Exp $ */
+/* $Id: font.cpp,v 1.121 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -14,7 +14,6 @@
 #include "wesconfig.h"
 #include "global.hpp"
 
-#include "display.hpp"
 #include "font.hpp"
 #include "filesystem.hpp"
 #include "game_config.hpp"
@@ -718,7 +717,7 @@
        return dest;
 }
 
-SDL_Rect draw_text_line(display* gui, const SDL_Rect& area, int size,
+SDL_Rect draw_text_line(CVideo* gui, const SDL_Rect& area, int size,
                         const SDL_Color& colour, const std::string& text,
                         int x, int y, bool use_tooltips, int style)
 {
@@ -727,7 +726,7 @@
        if(gui == NULL) {
                surface = NULL;
        } else {
-               surface = gui->video().getSurface();
+               surface = gui->getSurface();
        }
        
        return draw_text_line(surface, area, size, colour, text, x, y, 
use_tooltips, style);
@@ -739,7 +738,7 @@
        return draw_text(NULL, area, size, font::NORMAL_COLOUR, text, 0, 0, 
false, style);
 }
 
-SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
+SDL_Rect draw_text(CVideo* gui, const SDL_Rect& area, int size,
                    const SDL_Color& colour, const std::string& txt,
                    int x, int y, bool use_tooltips, int style)
 {
@@ -926,7 +925,7 @@
        return text; // Should not happen
 }
 
-SDL_Rect draw_wrapped_text(display* gui, const SDL_Rect& area, int font_size,
+SDL_Rect draw_wrapped_text(CVideo* gui, const SDL_Rect& area, int font_size,
                     const SDL_Color& colour, const std::string& text,
                     int x, int y, int max_width)
 {
Index: wesnoth/src/font.hpp
diff -u wesnoth/src/font.hpp:1.51 wesnoth/src/font.hpp:1.52
--- wesnoth/src/font.hpp:1.51   Wed Mar  9 23:30:27 2005
+++ wesnoth/src/font.hpp        Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: font.hpp,v 1.51 2005/03/09 23:30:27 ydirson Exp $ */
+/* $Id: font.hpp,v 1.52 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -16,7 +16,7 @@
 #include "SDL.h"
 #include "SDL_ttf.h"
 
-class display;
+class CVideo;
 #include "sdl_utils.hpp"
 #include "serialization/string_utils.hpp"
 
@@ -88,7 +88,7 @@
 //a bounding rectangle of the text is returned. If gui is NULL, then the
 //text will not be drawn, and a bounding rectangle only will be returned.
 
-SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
+SDL_Rect draw_text(CVideo* gui, const SDL_Rect& area, int size,
                    const SDL_Color& colour, const std::string& text,
                    int x, int y, bool use_tooltips = false, int style = 0);
 
@@ -134,7 +134,7 @@
 ///
 /// @return a bounding rectangle of the text.
 /// 
-SDL_Rect draw_wrapped_text(display* gui, const SDL_Rect& area, int font_size,
+SDL_Rect draw_wrapped_text(CVideo* gui, const SDL_Rect& area, int font_size,
                             const SDL_Color& colour, const std::string& text,
                             int x, int y, int max_width);
 
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.205 wesnoth/src/game.cpp:1.206
--- wesnoth/src/game.cpp:1.205  Wed Mar  9 22:58:18 2005
+++ wesnoth/src/game.cpp        Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.205 2005/03/09 22:58:18 ydirson Exp $ */
+/* $Id: game.cpp,v 1.206 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1429,7 +1429,7 @@
        try {
                const LEVEL_RESULT result = 
::play_game(disp(),state_,game_config_,units_data_,video_);
                if(result == VICTORY) {
-                       the_end(disp());
+                       the_end(disp().video());
                        about::show_about(disp());
                }
        } catch(gamestatus::load_game_exception& e) {
Index: wesnoth/src/intro.cpp
diff -u wesnoth/src/intro.cpp:1.68 wesnoth/src/intro.cpp:1.69
--- wesnoth/src/intro.cpp:1.68  Thu Mar 10 22:29:57 2005
+++ wesnoth/src/intro.cpp       Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: intro.cpp,v 1.68 2005/03/10 22:29:57 ydirson Exp $ */
+/* $Id: intro.cpp,v 1.69 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -140,8 +140,8 @@
                const SDL_Rect area = {0,0,screen.x(),screen.y()};
                const SDL_Rect scenario_size =
                      
font::draw_text(NULL,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,0,0);
-                               
update_rect(font::draw_text(&screen,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,
-                               dstrect.x,dstrect.y - scenario_size.h - 4));
+               
update_rect(font::draw_text(&screen.video(),area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,
+                                           dstrect.x,dstrect.y - 
scenario_size.h - 4));
        }
 
        update_whole_screen();
@@ -257,7 +257,7 @@
                        // FIXME: this is broken: it does not take kerning into 
account.
                        std::string tmp;
                        tmp.append(itor.substr().first, itor.substr().second);
-                       const SDL_Rect rect = font::draw_text(&screen,
+                       const SDL_Rect rect = font::draw_text(&screen.video(),
                                        screen.screen_area(),font::SIZE_PLUS,
                                        font::NORMAL_COLOUR,tmp,xpos,ypos,
                                        false);
@@ -303,28 +303,28 @@
        return true;
 }
 
-void the_end(display& screen)
+void the_end(CVideo& screen)
 {
-       SDL_Rect area = screen.screen_area();
-       SDL_FillRect(screen.video().getSurface(),&area,0);
+       SDL_Rect area = screen_area();
+       SDL_FillRect(screen.getSurface(),&area,0);
 
        update_whole_screen();
-       screen.video().flip();
+       screen.flip();
 
        const std::string text = _("The End");
        const size_t font_size = font::SIZE_XLARGE;
        
        area = font::text_area(text,font_size);
-       area.x = screen.screen_area().w/2 - area.w/2;
-       area.y = screen.screen_area().h/2 - area.h/2;
+       area.x = screen_area().w/2 - area.w/2;
+       area.y = screen_area().h/2 - area.h/2;
 
        for(size_t n = 0; n < 255; n += 5) {
                const SDL_Color col = {n,n,n,n};
                font::draw_text(&screen,area,font_size,col,text,area.x,area.y);
                update_rect(area);
-               screen.video().flip();
+               screen.flip();
 
-               SDL_FillRect(screen.video().getSurface(),&area,0);
+               SDL_FillRect(screen.getSurface(),&area,0);
 
                SDL_Delay(10);
        }
Index: wesnoth/src/intro.hpp
diff -u wesnoth/src/intro.hpp:1.18 wesnoth/src/intro.hpp:1.19
--- wesnoth/src/intro.hpp:1.18  Thu Mar 10 01:24:31 2005
+++ wesnoth/src/intro.hpp       Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: intro.hpp,v 1.18 2005/03/10 01:24:31 ydirson Exp $ */
+/* $Id: intro.hpp,v 1.19 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -14,6 +14,7 @@
 #define INTRO_HPP_INCLUDED
 
 class config;
+class CVideo;
 class display;
 #include "SDL.h"
 
@@ -33,6 +34,6 @@
 //user able to go to the next part, or skip it entirely.
 void show_intro(display& screen, const config& data, const config& level);
 
-void the_end(display& screen);
+void the_end(CVideo& screen);
 
 #endif
Index: wesnoth/src/mapgen_dialog.cpp
diff -u wesnoth/src/mapgen_dialog.cpp:1.33 wesnoth/src/mapgen_dialog.cpp:1.34
--- wesnoth/src/mapgen_dialog.cpp:1.33  Thu Mar 10 22:29:57 2005
+++ wesnoth/src/mapgen_dialog.cpp       Tue Mar 15 20:01:31 2005
@@ -89,13 +89,13 @@
        const std::string& villages_label = _("Villages:");
        const std::string& landform_label = _("Landform:");
 
-       SDL_Rect players_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,0,0);
-       SDL_Rect width_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,0,0);
-       SDL_Rect height_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,0,0);
-       SDL_Rect iterations_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,0,0);
-       SDL_Rect hillsize_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,0,0);
-       SDL_Rect villages_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,0,0);
-       SDL_Rect landform_rect = 
font::draw_text(NULL,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,0,0);
+       SDL_Rect players_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,0,0);
+       SDL_Rect width_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,0,0);
+       SDL_Rect height_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,0,0);
+       SDL_Rect iterations_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,0,0);
+       SDL_Rect hillsize_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,0,0);
+       SDL_Rect villages_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,0,0);
+       SDL_Rect landform_rect = 
font::draw_text(NULL,screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,0,0);
 
        const int horz_margin = 5;
        const int text_right = xpos + horz_margin +
@@ -226,37 +226,37 @@
                events::raise_process_event();
                events::raise_draw_event();
 
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,players_rect.x,players_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,width_rect.x,width_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,height_rect.x,height_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,iterations_rect.x,iterations_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,hillsize_rect.x,hillsize_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,villages_rect.x,villages_rect.y);
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,landform_rect.x,landform_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_label,players_rect.x,players_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_label,width_rect.x,width_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_label,height_rect.x,height_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,iterations_label,iterations_rect.x,iterations_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,hillsize_label,hillsize_rect.x,hillsize_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_label,villages_rect.x,villages_rect.y);
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_label,landform_rect.x,landform_rect.y);
 
                std::stringstream players_str;
                players_str << nplayers_;
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_str.str(),
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,players_str.str(),
                                slider_right+horz_margin,players_rect.y);
 
                std::stringstream width_str;
                width_str << width_;
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_str.str(),
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,width_str.str(),
                                slider_right+horz_margin,width_rect.y);
 
                std::stringstream height_str;
                height_str << height_;
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_str.str(),
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,height_str.str(),
                                slider_right+horz_margin,height_rect.y);
                
                std::stringstream villages_str;
                villages_str << nvillages_ << _("/1000 tiles");
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_str.str(),
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,villages_str.str(),
                                slider_right+horz_margin,villages_rect.y);
 
                std::stringstream landform_str;
                landform_str << gettext(island_size_ == 0 ? N_("Inland") : 
(island_size_ < max_coastal ? N_("Coastal") : N_("Island")));
-               
font::draw_text(&disp,disp.screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_str.str(),
+               
font::draw_text(&disp.video(),screen_area(),font::SIZE_NORMAL,font::NORMAL_COLOUR,landform_str.str(),
                                    slider_right+horz_margin,landform_rect.y);
 
                update_rect(xpos,ypos,width,height);
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.120 
wesnoth/src/multiplayer_connect.cpp:1.121
--- wesnoth/src/multiplayer_connect.cpp:1.120   Wed Mar  9 20:48:42 2005
+++ wesnoth/src/multiplayer_connect.cpp Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.120 2005/03/09 20:48:42 ydirson Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.121 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -758,7 +758,7 @@
                        bottom-left_button->height()-gui::ButtonVPadding);
 
        // Title and labels
-       gui::draw_dialog_title(left,top,&disp(),_("Game Lobby"));
+       gui::draw_dialog_title(left,top,&disp().video(),_("Game Lobby"));
 
        
type_title_label_.set_location((left+30)+(launch_.width()/2)-(type_title_label_.width()/2),top+35);
        
faction_title_label_.set_location((left+145)+(launch_.width()/2)-(faction_title_label_.width()/2),top+35);
Index: wesnoth/src/multiplayer_create.cpp
diff -u wesnoth/src/multiplayer_create.cpp:1.14 
wesnoth/src/multiplayer_create.cpp:1.15
--- wesnoth/src/multiplayer_create.cpp:1.14     Tue Mar 15 00:45:00 2005
+++ wesnoth/src/multiplayer_create.cpp  Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_create.cpp,v 1.14 2005/03/15 00:45:00 ydirson Exp $ */
+/* $Id: multiplayer_create.cpp,v 1.15 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -376,7 +376,7 @@
        int ypos = ca.y;
 
        // Dialog title
-       ypos += gui::draw_dialog_title(xpos, ypos, &disp(), _("Create Game")).h 
+ border_size;
+       ypos += gui::draw_dialog_title(xpos, ypos, &disp().video(), _("Create 
Game")).h + border_size;
 
        // Name Entry
        name_entry_label_.set_location(xpos, ypos);
Index: wesnoth/src/multiplayer_wait.cpp
diff -u wesnoth/src/multiplayer_wait.cpp:1.12 
wesnoth/src/multiplayer_wait.cpp:1.13
--- wesnoth/src/multiplayer_wait.cpp:1.12       Mon Mar 14 21:07:36 2005
+++ wesnoth/src/multiplayer_wait.cpp    Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_wait.cpp,v 1.12 2005/03/14 21:07:36 gruikya Exp $ */
+/* $Id: multiplayer_wait.cpp,v 1.13 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -108,10 +108,10 @@
                        SDL_BlitSurface(unit_image,NULL,screen,&image_rect);
                }
 
-               
font::draw_text(&disp(),area,font::SIZE_PLUS,font::NORMAL_COLOUR,faction,area.x 
+ 80, area.y + 30);
-               const SDL_Rect leader_rect = 
font::draw_text(&disp(),area,font::SIZE_SMALL,font::NORMAL_COLOUR,
+               
font::draw_text(&disp().video(),area,font::SIZE_PLUS,font::NORMAL_COLOUR,faction,area.x
 + 80, area.y + 30);
+               const SDL_Rect leader_rect = 
font::draw_text(&disp().video(),area,font::SIZE_SMALL,font::NORMAL_COLOUR,
                                _("Leader: "),area.x, area.y + 80);
-               
font::draw_wrapped_text(&disp(),area,font::SIZE_SMALL,font::NORMAL_COLOUR,
+               
font::draw_wrapped_text(&disp().video(),area,font::SIZE_SMALL,font::NORMAL_COLOUR,
                                _("Recruits: ") + recruit_string.str(),area.x, 
area.y + 102,
                                area.w);
 
Index: wesnoth/src/preferences.cpp
diff -u wesnoth/src/preferences.cpp:1.142 wesnoth/src/preferences.cpp:1.143
--- wesnoth/src/preferences.cpp:1.142   Thu Mar 10 22:29:57 2005
+++ wesnoth/src/preferences.cpp Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: preferences.cpp,v 1.142 2005/03/10 22:29:57 ydirson Exp $ */
+/* $Id: preferences.cpp,v 1.143 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1193,7 +1193,7 @@
                                                                        
centery-text_size.h/2 - 6,
                                                                        
text_size.w+40,
                                                                        
text_size.h+12,disp);
-                       font::draw_text (&disp, clip_rect, 
font::SIZE_LARGE,font::NORMAL_COLOUR,
+                       font::draw_text (&disp.video(), clip_rect, 
font::SIZE_LARGE,font::NORMAL_COLOUR,
                                 _("Press desired 
HotKey"),centerx-text_size.w/2-10,
                                 centery-text_size.h/2-3);
                        disp.update_display();
Index: wesnoth/src/show_dialog.cpp
diff -u wesnoth/src/show_dialog.cpp:1.113 wesnoth/src/show_dialog.cpp:1.114
--- wesnoth/src/show_dialog.cpp:1.113   Thu Mar 10 22:29:57 2005
+++ wesnoth/src/show_dialog.cpp Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: show_dialog.cpp,v 1.113 2005/03/10 22:29:57 ydirson Exp $ */
+/* $Id: show_dialog.cpp,v 1.114 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -204,11 +204,11 @@
        }
 }
 
-SDL_Rect draw_dialog_title(int x, int y, display* disp, const std::string& 
text)
+SDL_Rect draw_dialog_title(int x, int y, CVideo* disp, const std::string& text)
 {
        SDL_Rect rect = {0,0,10000,10000};
        if(disp != NULL) {
-               rect = disp->screen_area();
+               rect = screen_area();
        }
 
        return font::draw_text(disp, rect, font::SIZE_LARGE, font::TITLE_COLOUR,
@@ -257,7 +257,7 @@
        draw_dialog_frame(xpos,ypos,width,height,disp,style,restorer);
 
        if (!title.empty()) {
-               draw_dialog_title(x + border_size, y - title_area.h, &disp, 
title);
+         draw_dialog_title(x + border_size, y - title_area.h, &disp.video(), 
title);
        }
 
        if(buttons != NULL) {
@@ -696,7 +696,7 @@
                                         text_widget_width - 
text_widget.location().w,
                                         text_widget_y_unpadded);
                events::raise_draw_event();
-               font::draw_text(&disp, clipRect, message_font_size,
+               font::draw_text(&disp.video(), clipRect, message_font_size,
                                font::NORMAL_COLOUR, text_widget_label,
                                                xloc + 
left_padding,text_widget_y_unpadded);
        }
@@ -713,13 +713,13 @@
 
                disp.blit_surface(x,y,image);
 
-               font::draw_text(&disp, clipRect, caption_font_size,
+               font::draw_text(&disp.video(), clipRect, caption_font_size,
                                font::NORMAL_COLOUR, caption,
                                xloc+image_width+left_padding+image_h_padding,
                                yloc+top_padding);
        }
 
-       font::draw_text(&disp, clipRect, message_font_size,
+       font::draw_text(&disp.video(), clipRect, message_font_size,
                        font::NORMAL_COLOUR, message,
                        xloc+image_width+left_padding+image_h_padding,
                        yloc+top_padding+caption_size.h);
Index: wesnoth/src/show_dialog.hpp
diff -u wesnoth/src/show_dialog.hpp:1.43 wesnoth/src/show_dialog.hpp:1.44
--- wesnoth/src/show_dialog.hpp:1.43    Thu Mar 10 21:42:04 2005
+++ wesnoth/src/show_dialog.hpp Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: show_dialog.hpp,v 1.43 2005/03/10 21:42:04 ydirson Exp $ */
+/* $Id: show_dialog.hpp,v 1.44 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -58,7 +58,7 @@
 
 //given the location of a dialog, will draw its title.
 //Returns the area the title takes up
-SDL_Rect draw_dialog_title(int x, int y, display* disp, const std::string& 
text);
+SDL_Rect draw_dialog_title(int x, int y, CVideo* disp, const std::string& 
text);
 
 //function to draw a dialog on the screen. x,y,w,h give the dimensions of the 
client area
 //of the dialog. 'title' is the title of the dialog. The title will be 
displayed at the
Index: wesnoth/src/titlescreen.cpp
diff -u wesnoth/src/titlescreen.cpp:1.34 wesnoth/src/titlescreen.cpp:1.35
--- wesnoth/src/titlescreen.cpp:1.34    Wed Mar  9 22:58:18 2005
+++ wesnoth/src/titlescreen.cpp Tue Mar 15 20:01:31 2005
@@ -155,7 +155,7 @@
                ERR_DP << "Could not find title image\n";
        } else {
                screen.blit_surface(0,0,title_surface);
-               update_rect(screen.screen_area());
+               update_rect(screen_area());
 
                LOG_DP << "displayed title image\n";
        }
@@ -167,13 +167,13 @@
        const std::string& version_str = _("Version") + std::string(" ") +
                                         game_config::version;
 
-       const SDL_Rect version_area = font::draw_text(NULL,screen.screen_area(),
+       const SDL_Rect version_area = font::draw_text(NULL,screen_area(),
                                                      font::SIZE_TINY,
                                            
font::NORMAL_COLOUR,version_str,0,0);
        const size_t versiony = screen.y() - version_area.h;
 
        if(versiony < size_t(screen.y())) {
-               font::draw_text(&screen,screen.screen_area(),
+               font::draw_text(&screen.video(),screen.screen_area(),
                                font::SIZE_TINY,
                                font::NORMAL_COLOUR,version_str,0,versiony);
        }
@@ -255,8 +255,8 @@
 
                draw_dialog_frame(area.x,area.y,area.w,area.h,screen,&style);
 
-               
font::draw_text(&screen,area,font::SIZE_NORMAL,font::NORMAL_COLOUR,tip_of_day,area.x+pad,area.y+pad);
-               font::draw_text(&screen, area, font::SIZE_NORMAL, 
font::NORMAL_COLOUR,
+               
font::draw_text(&screen.video(),area,font::SIZE_NORMAL,font::NORMAL_COLOUR,tip_of_day,area.x+pad,area.y+pad);
+               font::draw_text(&screen.video(), area, font::SIZE_NORMAL, 
font::NORMAL_COLOUR,
                                tome, area.x + area.w - tome_area.w - pad,
                                next_tip_button.location().y - tome_area.h - 
pad, false, TTF_STYLE_ITALIC);
        }
Index: wesnoth/src/tooltips.cpp
diff -u wesnoth/src/tooltips.cpp:1.21 wesnoth/src/tooltips.cpp:1.22
--- wesnoth/src/tooltips.cpp:1.21       Tue Mar 15 00:45:00 2005
+++ wesnoth/src/tooltips.cpp    Tue Mar 15 20:01:31 2005
@@ -156,7 +156,7 @@
        current_tooltip = tips.end();
 }
 
-SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
+SDL_Rect draw_text(CVideo* gui, const SDL_Rect& area, int size,
                    const SDL_Color& colour, const std::string& text,
                    int x, int y)
 {
Index: wesnoth/src/tooltips.hpp
diff -u wesnoth/src/tooltips.hpp:1.9 wesnoth/src/tooltips.hpp:1.10
--- wesnoth/src/tooltips.hpp:1.9        Tue Mar 15 00:45:00 2005
+++ wesnoth/src/tooltips.hpp    Tue Mar 15 20:01:31 2005
@@ -2,7 +2,6 @@
 #define TOOLTIPS_HPP_INCLUDED
 
 class CVideo;
-class display;
 
 #include "SDL.h"
 
@@ -10,7 +9,7 @@
 
 struct manager
 {
-       manager(CVideo& disp);
+       manager(CVideo& video);
        ~manager();
 };
 
@@ -22,7 +21,7 @@
 
 //a function exactly the same as font::draw_text, but will also register
 //a tooltip
-SDL_Rect draw_text(display* gui, const SDL_Rect& area, int size,
+SDL_Rect draw_text(CVideo* gui, const SDL_Rect& area, int size,
                    const SDL_Color& colour, const std::string& text,
                    int x, int y);
 
Index: wesnoth/src/widgets/button.cpp
diff -u wesnoth/src/widgets/button.cpp:1.57 wesnoth/src/widgets/button.cpp:1.58
--- wesnoth/src/widgets/button.cpp:1.57 Thu Mar  3 22:43:25 2005
+++ wesnoth/src/widgets/button.cpp      Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: button.cpp,v 1.57 2005/03/03 22:43:25 ydirson Exp $ */
+/* $Id: button.cpp,v 1.58 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -157,7 +157,7 @@
                break;
        }
 
-       SDL_Rect const &clipArea = disp().screen_area();
+       SDL_Rect const &clipArea = screen_area();
        SDL_Rect const &loc = location();
        const int texty = loc.y + loc.h / 2 - textRect_.h / 2 + offset;
        int textx;
@@ -172,7 +172,7 @@
 
        disp().blit_surface(loc.x, loc.y, image);
        const std::string etext = font::make_text_ellipsis(label_, font_size, 
loc.w);
-       font::draw_text(&disp(), clipArea, font_size, font::BUTTON_COLOUR, 
etext, textx, texty);
+       font::draw_text(&disp().video(), clipArea, font_size, 
font::BUTTON_COLOUR, etext, textx, texty);
 
        update_rect(loc);
 }
Index: wesnoth/src/widgets/label.cpp
diff -u wesnoth/src/widgets/label.cpp:1.6 wesnoth/src/widgets/label.cpp:1.7
--- wesnoth/src/widgets/label.cpp:1.6   Wed Mar  9 23:30:28 2005
+++ wesnoth/src/widgets/label.cpp       Tue Mar 15 20:01:31 2005
@@ -1,4 +1,4 @@
-/* $Id: label.cpp,v 1.6 2005/03/09 23:30:28 ydirson Exp $ */
+/* $Id: label.cpp,v 1.7 2005/03/15 20:01:31 ydirson Exp $ */
 /*
    Copyright (C) 2004 by Philippe Plantier <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -16,6 +16,7 @@
 #include "label.hpp"
 #include "../display.hpp"
 #include "../font.hpp"
+#include "../video.hpp"
 
 namespace gui {
 
@@ -67,7 +68,7 @@
 
 void label::draw_contents()
 {
-       font::draw_text(&disp(), disp().screen_area(), size_, colour_, text_, 
location().x, location().y);
+       font::draw_text(&disp().video(), screen_area(), size_, colour_, text_, 
location().x, location().y);
 }
 
 void label::update_label_size()
Index: wesnoth/src/widgets/menu.cpp
diff -u wesnoth/src/widgets/menu.cpp:1.80 wesnoth/src/widgets/menu.cpp:1.81
--- wesnoth/src/widgets/menu.cpp:1.80   Thu Mar 10 02:09:26 2005
+++ wesnoth/src/widgets/menu.cpp        Tue Mar 15 20:01:31 2005
@@ -429,7 +429,7 @@
                                        font::make_text_ellipsis(str, 
menu_font_size, loc.w - (xpos - rect.x)) : str;
                                const SDL_Rect& text_size = 
font::text_area(str,menu_font_size);
                                const size_t y = rect.y + (rect.h - 
text_size.h)/2;
-                               
font::draw_text(&disp(),area,menu_font_size,font::NORMAL_COLOUR,to_show,xpos,y);
+                               
font::draw_text(&disp().video(),area,menu_font_size,font::NORMAL_COLOUR,to_show,xpos,y);
                                xpos += text_size.w + 5;
                        }
                }
Index: wesnoth/src/widgets/progressbar.cpp
diff -u wesnoth/src/widgets/progressbar.cpp:1.6 
wesnoth/src/widgets/progressbar.cpp:1.7
--- wesnoth/src/widgets/progressbar.cpp:1.6     Wed Mar  9 23:30:28 2005
+++ wesnoth/src/widgets/progressbar.cpp Tue Mar 15 20:01:31 2005
@@ -37,7 +37,7 @@
                text_area.x = area.x + area.w/2 - text_area.w/2;
                text_area.y = area.y + area.h/2 - text_area.h/2;
 
-               
font::draw_text(&disp(),location(),font::SIZE_NORMAL,font::BLACK_COLOUR,text,text_area.x,text_area.y);
+               
font::draw_text(&disp().video(),location(),font::SIZE_NORMAL,font::BLACK_COLOUR,text,text_area.x,text_area.y);
        }
 
        update_rect(location());




reply via email to

[Prev in Thread] Current Thread [Next in Thread]