Remove useless function.

This commit is contained in:
Guillaume Melquiond 2004-11-27 09:05:11 +00:00
parent d0293b6c85
commit fcea56052d
2 changed files with 4 additions and 56 deletions

View file

@ -1697,8 +1697,8 @@ std::vector<surface> display::get_terrain_images(int x, int y, image::TYPE image
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 @@ std::vector<surface> display::get_terrain_images(int x, int y, image::TYPE image
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 @@ std::vector<surface> display::get_terrain_images(int x, int y, image::TYPE image
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);

View file

@ -384,14 +384,6 @@ private:
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);