Author: alink
Date: Fri Aug 3 05:46:04 2007
New Revision: 19308
URL: http://svn.gna.org/viewcvs/wesnoth?rev=19308&view=rev
Log:
A terrain_type variable of the main function to draw a tile was only used for
checking village flag,
so move it into the get_flag function.
Modified:
trunk/src/game_display.cpp
trunk/src/game_display.hpp
Modified: trunk/src/game_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=19308&r1=19307&r2=19308&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Fri Aug 3 05:46:04 2007
@@ -305,12 +305,7 @@
image_type = image::SEMI_BRIGHTENED;
}
*/
-
- t_translation::t_letter terrain =
t_translation::VOID_TERRAIN;
-
- if(!is_shrouded || !on_map) {
- terrain = map_.get_terrain(*it);
- }
+
tile_stack_clear();
@@ -319,7 +314,7 @@
tile_stack_terrains(*it,tod.id, image_type,
ADJACENT_BACKGROUND);
// village-control flags.
- tile_stack_append(get_flag(terrain,*it));
+ tile_stack_append(get_flag(*it));
typedef overlay_map::const_iterator Itor;
@@ -820,8 +815,10 @@
return image;
}
-surface game_display::get_flag(const t_translation::t_letter& terrain, const
gamemap::location& loc)
-{
+surface game_display::get_flag(const gamemap::location& loc)
+{
+ t_translation::t_letter terrain = map_.get_terrain(loc);
+
if(!map_.is_village(terrain)) {
return surface(NULL);
}
Modified: trunk/src/game_display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.hpp?rev=19308&r1=19307&r2=19308&view=diff
==============================================================================
--- trunk/src/game_display.hpp (original)
+++ trunk/src/game_display.hpp Fri Aug 3 05:46:04 2007
@@ -182,7 +182,7 @@
void draw_game_status();
//this surface must be freed by the caller
- surface get_flag(const t_translation::t_letter& terrain, const
gamemap::location& loc);
+ surface get_flag(const gamemap::location& loc);
unit_map& units_;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits