mail[Wesnoth-commits] r20018 - /trunk/src/game_display.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on September 01, 2007 - 06:08:
Author: alink
Date: Sat Sep  1 06:07:48 2007
New Revision: 20018

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20018&view=rev
Log:
Revert my last change (displaying grid on half-hexes at border of the map)
It seems that some people see the grid not only like a geometric object,
but also like a gameplay indication showing playable hexes.
So, continue in this direction and improve its consistency:
now we also remove the grid from off-map tiles (thanks Uso and Mordante).

Modified:
    trunk/src/game_display.cpp

Modified: trunk/src/game_display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=20018&r1=20017&r2=20018&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Sat Sep  1 06:07:48 2007
@@ -292,6 +292,7 @@
                        // (the shroud has some glitches due to
                        // commented out code, but enabling it looks worse).
                        const bool on_map = map_.on_board(*it);
+                       const bool off_map_tile = (map_.get_terrain(*it) == 
t_translation::OFF_MAP_USER);
                        const bool is_shrouded = shrouded(*it);
 
                        image::TYPE image_type = image::SCALED_TO_HEX;
@@ -348,7 +349,7 @@
                        }
 
                        // Draw the grid, if that's been enabled
-                       if(grid_ && !is_shrouded) {
+                       if(grid_ && !is_shrouded && on_map && !off_map_tile) {
                                
tile_stack_append(image::get_image(game_config::grid_image, 
image::SCALED_TO_HEX));
                        }
 
@@ -410,7 +411,7 @@
                        //simulate_delay += 1;
 
                        // If the tile is at the border, we start to blend it
-                       if(!on_map && map_.get_terrain(*it) != 
t_translation::OFF_MAP_USER) {
+                       if(!on_map && !off_map_tile) {
                                 draw_border(*it, xpos, ypos);
                        }
                }




Related Messages


Powered by MHonArc, Updated Sat Sep 01 08:40:11 2007