Author: mordante
Date: Sun May 27 10:11:06 2007
New Revision: 17892
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17892&view=rev
Log:
changed draw_terrain_on_tile() 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=17892&r1=17891&r2=17892&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Sun May 27 10:11:06 2007
@@ -1406,10 +1406,8 @@
}
}
-void display::draw_terrain_on_tile(int x, int y, image::TYPE image_type,
ADJACENT_TERRAIN_TYPE type)
-{
-
- const gamemap::location loc(x,y);
+void display::draw_terrain_on_tile(const gamemap::location& loc, image::TYPE
image_type, ADJACENT_TERRAIN_TYPE type)
+{
int xpos = int(get_location_x(loc));
int ypos = int(get_location_y(loc));
@@ -1424,7 +1422,7 @@
clip_rect_setter set_clip_rect(dst,clip_rect);
- const std::vector<surface>& images =
get_terrain_images(x,y,image_type,type);
+ const std::vector<surface>& images =
get_terrain_images(loc.x,loc.y,image_type,type);
std::vector<surface>::const_iterator itor;
for(itor = images.begin(); itor != images.end(); ++itor) {
@@ -1479,7 +1477,7 @@
}
if(!is_shrouded) {
-
draw_terrain_on_tile(loc.x,loc.y,image_type,ADJACENT_BACKGROUND);
+ draw_terrain_on_tile(loc,image_type,ADJACENT_BACKGROUND);
surface flag(get_flag(terrain,loc));
if(flag != NULL) {
@@ -1518,7 +1516,7 @@
draw_footstep(loc,xpos,ypos);
if(!is_shrouded) {
-
draw_terrain_on_tile(loc.x,loc.y,image_type,ADJACENT_FOREGROUND);
+ draw_terrain_on_tile(loc,image_type,ADJACENT_FOREGROUND);
}
if(fogged(loc) && shrouded(loc) == false) {
@@ -1530,7 +1528,7 @@
}
if(!shrouded(loc)) {
- draw_terrain_on_tile(loc.x,loc.y,image_type,ADJACENT_FOGSHROUD);
+ draw_terrain_on_tile(loc,image_type,ADJACENT_FOGSHROUD);
}
//draw the time-of-day mask on top of the hex
Modified: trunk/src/display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.hpp?rev=17892&r1=17891&r2=17892&view=diff
==============================================================================
--- trunk/src/display.hpp (original)
+++ trunk/src/display.hpp Sun May 27 10:11:06 2007
@@ -71,7 +71,6 @@
//the map. Used for special effects like flashes.
void adjust_colours(int r, int g, int b);
-
//function which scrolls the display by xmov,ymov. Invalidation and
//redrawing will be scheduled.
void scroll(int xmov, int ymov);
@@ -231,7 +230,7 @@
enum ADJACENT_TERRAIN_TYPE { ADJACENT_BACKGROUND, ADJACENT_FOREGROUND,
ADJACENT_FOGSHROUD };
//composes and draws the terrains on a tile
- void draw_terrain_on_tile(int x, int y, image::TYPE image_type,
ADJACENT_TERRAIN_TYPE type);
+ void draw_terrain_on_tile(const gamemap::location& loc, image::TYPE
image_type, ADJACENT_TERRAIN_TYPE type);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits