Author: alink
Date: Tue May 12 19:23:46 2009
New Revision: 35599

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35599&view=rev
Log:
Fix imprecise tile_on_screen function
possibly improving the scrolling tracking of moving units near the south/east 
edges of the screen

Modified:
    trunk/src/display.cpp

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=35599&r1=35598&r2=35599&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Tue May 12 19:23:46 2009
@@ -1538,9 +1538,8 @@
 
 bool display::tile_on_screen(const map_location& loc)
 {
-       int x = get_location_x(loc);
-       int y = get_location_y(loc);
-       return !outside_area(map_area(), x, y);
+       SDL_Rect r = { get_location_x(loc), get_location_y(loc), hex_size(), 
hex_size()};
+       return rects_overlap(r, map_area());
 }
 
 bool display::tile_nearly_on_screen(const map_location& loc)


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to