[Freeciv-Dev] (PR#12608) gui_rect_iterate iterates over too large an are
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12608 >
In non-iso view the area of iteration is larger than necessary. I
believe this fixes it.
-jason
? diff
Index: client/mapview_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.h,v
retrieving revision 1.107
diff -u -r1.107 mapview_common.h
--- client/mapview_common.h 23 Mar 2005 17:56:54 -0000 1.107
+++ client/mapview_common.h 23 Mar 2005 21:19:31 -0000
@@ -105,8 +105,8 @@
const int _Wr = NORMAL_TILE_WIDTH; \
const int _Hr = NORMAL_TILE_HEIGHT;
\
/* Don't divide by _r yet, to avoid integer rounding errors. */ \
- const int GRI_x0 = DIVIDE(_gui_x0 * _r, _Wr) - 1; \
- const int GRI_y0 = DIVIDE(_gui_y0 * _r, _Hr) - 1; \
+ const int GRI_x0 = DIVIDE(_gui_x0 * _r, _Wr) - _ratio / 2; \
+ const int GRI_y0 = DIVIDE(_gui_y0 * _r, _Hr) - _ratio / 2; \
const int GRI_x1 = DIVIDE((_gui_x0 + _width) * _r + _Wr - 1, \
_Wr) + _ratio; \
const int GRI_y1 = DIVIDE((_gui_y0 + _height) * _r + _Hr - 1, \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12608) gui_rect_iterate iterates over too large an area,
Jason Short <=
|
|