[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src display.cpp display.hpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src display.cpp display.hpp |
Date: |
Sat, 27 Nov 2004 04:11:09 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/11/27 09:05:11
Modified files:
src : display.cpp display.hpp
Log message:
Remove useless function.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.cpp.diff?tr1=1.277&tr2=1.278&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/display.hpp.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
Patches:
Index: wesnoth/src/display.cpp
diff -u wesnoth/src/display.cpp:1.277 wesnoth/src/display.cpp:1.278
--- wesnoth/src/display.cpp:1.277 Mon Nov 22 21:39:13 2004
+++ wesnoth/src/display.cpp Sat Nov 27 09:05:11 2004
@@ -1,4 +1,4 @@
-/* $Id: display.cpp,v 1.277 2004/11/22 21:39:13 silene Exp $ */
+/* $Id: display.cpp,v 1.278 2004/11/27 09:05:11 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1697,8 +1697,8 @@
image::locator image(*it);
// image.filename = "terrain/" + *it;
- const surface
surface(get_terrain(image,image_type,x,y));
- if(surface != NULL) {
+ const surface surface(image::get_image(image,
image_type));
+ if (!surface.null()) {
res.push_back(surface);
}
}
@@ -1723,8 +1723,8 @@
image::locator image = it->get_current_frame();
// image.filename = "terrain/" + image.filename;
- const surface
surface(get_terrain(image,image_type,x,y));
- if(surface != NULL) {
+ const surface surface(image::get_image(image,
image_type));
+ if (!surface.null()) {
res.push_back(surface);
}
}
@@ -1733,50 +1733,6 @@
return res;
}
-surface display::get_terrain(const image::locator& image, image::TYPE
image_type,
- int x, int y)
-{
-
-#if 0
- //see if there is a time-of-day specific version of this image
- if(search_tod) {
- // image::locator tod_image = image;
- // tod_image.filename = image.filename + "-" + tod.id + ".png";
- const image::locator& tod_image = image::get_alternative(image,
"-" + tod.id);
- im = image::get_image(tod_image,image_type);
-
- if(im != NULL) {
- return im;
- }
- }
-#endif
-
- // image::locator tmp = image;
- // tmp.filename += ".png";
-
- const surface im(image::get_image(image, image_type));
- if(im == NULL) {
- return im;
- }
-
-#if 0
- //see if this tile is illuminated to a different colour than it'd
- //normally be displayed as
- const int radj = tod_at.red - tod.red;
- const int gadj = tod_at.green - tod.green;
- const int badj = tod_at.blue - tod.blue;
-
- if((radj|gadj|badj) != 0 && im != NULL) {
- const surface backup(im);
- im = surface(adjust_surface_colour(im,radj,gadj,badj));
- if(im == NULL)
- ERR_DP << "could not adjust surface..\n";
- }
-#endif
-
- return im;
-}
-
surface display::get_flag(gamemap::TERRAIN terrain, int x, int y)
{
const bool village = map_.is_village(terrain);
Index: wesnoth/src/display.hpp
diff -u wesnoth/src/display.hpp:1.85 wesnoth/src/display.hpp:1.86
--- wesnoth/src/display.hpp:1.85 Mon Nov 22 21:39:13 2004
+++ wesnoth/src/display.hpp Sat Nov 27 09:05:11 2004
@@ -1,4 +1,4 @@
-/* $Id: display.hpp,v 1.85 2004/11/22 21:39:13 silene Exp $ */
+/* $Id: display.hpp,v 1.86 2004/11/27 09:05:11 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -384,14 +384,6 @@
std::vector<surface> get_terrain_images(int x, int y, image::TYPE type,
ADJACENT_TERRAIN_TYPE terrain_type);
std::vector<std::string> get_fog_shroud_graphics(const
gamemap::location& loc);
-
- //this surface must be freed by the caller
- //surface get_terrain(gamemap::TERRAIN, image::TYPE type,
- // int x, int y, const std::string& dir="");
- //this surface must be freed by the caller
- surface get_terrain(const image::locator &image, image::TYPE type,
- int x, int y);
-
//this surface must be freed by the caller
surface get_flag(gamemap::TERRAIN, int x, int y);
- [Wesnoth-cvs-commits] wesnoth/src display.cpp display.hpp,
Guillaume Melquiond <=