[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src multiplayer_create.cpp playlevel.cp...
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src multiplayer_create.cpp playlevel.cp... |
Date: |
Mon, 14 Mar 2005 19:45:00 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 05/03/15 00:45:00
Modified files:
src : multiplayer_create.cpp playlevel.cpp
tooltips.cpp tooltips.hpp
Log message:
cleanup of deps against display: tooltips do not need a display for
most work
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_create.cpp.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playlevel.cpp.diff?tr1=1.183&tr2=1.184&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/tooltips.cpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/tooltips.hpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: wesnoth/src/multiplayer_create.cpp
diff -u wesnoth/src/multiplayer_create.cpp:1.13
wesnoth/src/multiplayer_create.cpp:1.14
--- wesnoth/src/multiplayer_create.cpp:1.13 Fri Mar 11 02:29:12 2005
+++ wesnoth/src/multiplayer_create.cpp Tue Mar 15 00:45:00 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_create.cpp,v 1.13 2005/03/11 02:29:12 Sirp Exp $ */
+/* $Id: multiplayer_create.cpp,v 1.14 2005/03/15 00:45:00 ydirson Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -32,7 +32,7 @@
create::create(display& disp, const config &cfg, chat& c, config& gamelist) :
ui(disp, cfg, c, gamelist),
- tooltip_manager_(disp),
+ tooltip_manager_(disp.video()),
map_selection_(-1),
maps_menu_(disp, std::vector<std::string>()),
Index: wesnoth/src/playlevel.cpp
diff -u wesnoth/src/playlevel.cpp:1.183 wesnoth/src/playlevel.cpp:1.184
--- wesnoth/src/playlevel.cpp:1.183 Thu Mar 10 21:42:04 2005
+++ wesnoth/src/playlevel.cpp Tue Mar 15 00:45:00 2005
@@ -1,4 +1,4 @@
-/* $Id: playlevel.cpp,v 1.183 2005/03/10 21:42:04 ydirson Exp $ */
+/* $Id: playlevel.cpp,v 1.184 2005/03/15 00:45:00 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -389,7 +389,7 @@
}
const preferences::display_manager prefs_disp_manager(&gui);
- const tooltips::manager tooltips_manager(gui);
+ const tooltips::manager tooltips_manager(gui.video());
LOG_NG << "b... " << (SDL_GetTicks() - ticks) << "\n";
Index: wesnoth/src/tooltips.cpp
diff -u wesnoth/src/tooltips.cpp:1.20 wesnoth/src/tooltips.cpp:1.21
--- wesnoth/src/tooltips.cpp:1.20 Thu Mar 10 22:29:57 2005
+++ wesnoth/src/tooltips.cpp Tue Mar 15 00:45:00 2005
@@ -1,10 +1,10 @@
#include "global.hpp"
-#include "display.hpp"
#include "font.hpp"
+#include "sdl_utils.hpp"
#include "show_dialog.hpp"
#include "tooltips.hpp"
-#include "sdl_utils.hpp"
+#include "video.hpp"
#include <vector>
@@ -21,7 +21,7 @@
return xoverlap && yoverlap;
}
-display* display_ = NULL;
+CVideo* video_ = NULL;
struct tooltip
{
@@ -59,14 +59,14 @@
void show_tooltip(const tooltip& tip)
{
- if(display_ == NULL) {
+ if(video_ == NULL) {
return;
}
clear_tooltip();
const SDL_Color bgcolour = {0,0,0,128};
- SDL_Rect area = display_->screen_area();
+ SDL_Rect area = screen_area();
tooltip_handle =
font::add_floating_label(tip.message,font_size,font::NORMAL_COLOUR,
0,0,0,0,-1,area,font::LEFT_ALIGN,&bgcolour,10);
@@ -93,16 +93,16 @@
namespace tooltips {
-manager::manager(display& disp)
+manager::manager(CVideo& video)
{
clear_tooltips();
- display_ = &disp;
+ video_ = &video;
}
manager::~manager()
{
clear_tooltips();
- display_ = NULL;
+ video_ = NULL;
}
void clear_tooltips()
Index: wesnoth/src/tooltips.hpp
diff -u wesnoth/src/tooltips.hpp:1.8 wesnoth/src/tooltips.hpp:1.9
--- wesnoth/src/tooltips.hpp:1.8 Thu Mar 10 22:29:57 2005
+++ wesnoth/src/tooltips.hpp Tue Mar 15 00:45:00 2005
@@ -1,6 +1,7 @@
#ifndef TOOLTIPS_HPP_INCLUDED
#define TOOLTIPS_HPP_INCLUDED
+class CVideo;
class display;
#include "SDL.h"
@@ -9,7 +10,7 @@
struct manager
{
- manager(display& disp);
+ manager(CVideo& disp);
~manager();
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src multiplayer_create.cpp playlevel.cp...,
Yann Dirson <=