Author: mordante
Date: Sun May 27 10:33:06 2007
New Revision: 17894
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17894&view=rev
Log:
changed get_terrain_images() to use gamemap::location
Modified:
trunk/src/display.cpp
trunk/src/display.hpp
Modified: trunk/src/display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=17894&r1=17893&r2=17894&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Sun May 27 10:33:06 2007
@@ -1422,7 +1422,7 @@
clip_rect_setter set_clip_rect(dst,clip_rect);
- const std::vector<surface>& images =
get_terrain_images(loc.x,loc.y,image_type,type);
+ const std::vector<surface>& images =
get_terrain_images(loc,image_type,type);
std::vector<surface>::const_iterator itor;
for(itor = images.begin(); itor != images.end(); ++itor) {
@@ -1849,13 +1849,13 @@
return res;
}
-std::vector<surface> display::get_terrain_images(int x, int y, image::TYPE
image_type, ADJACENT_TERRAIN_TYPE terrain_type)
+std::vector<surface> display::get_terrain_images(const gamemap::location &loc,
+ image::TYPE image_type, ADJACENT_TERRAIN_TYPE terrain_type)
{
std::vector<surface> res;
- gamemap::location loc(x,y);
if(terrain_type == ADJACENT_FOGSHROUD) {
- const std::vector<std::string> fog_shroud =
get_fog_shroud_graphics(gamemap::location(x,y));
+ const std::vector<std::string> fog_shroud =
get_fog_shroud_graphics(loc);
if(!fog_shroud.empty()) {
for(std::vector<std::string>::const_iterator it =
fog_shroud.begin(); it != fog_shroud.end(); ++it) {
Modified: trunk/src/display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.hpp?rev=17894&r1=17893&r2=17894&view=diff
==============================================================================
--- trunk/src/display.hpp (original)
+++ trunk/src/display.hpp Sun May 27 10:33:06 2007
@@ -432,8 +432,9 @@
void bounds_check_position();
void bounds_check_position(int& xpos, int& ypos);
- // std::vector<surface> getAdjacentTerrain(int x, int y, image::TYPE
type, ADJACENT_TERRAIN_TYPE terrain_type);
- std::vector<surface> get_terrain_images(int x, int y, image::TYPE type,
ADJACENT_TERRAIN_TYPE terrain_type);
+ std::vector<surface> get_terrain_images(const gamemap::location &loc,
+ 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
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits