[Freeciv-Dev] Re: (PR#6355) clicking on minimap error
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Per I. Mathisen wrote:
> GTK2 client, CVS current
>
> Clicking on the minimap to move map view when close to the wrap-around end
> of the map is no longer possible. I am either sent to a wrong position or
> to no place at all.
This patch fixes it - using CLIP instead of WRAP leads to this error.
This should also be solved (better) by the PR#6346 patch.
jason
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.63
diff -u -r1.63 mapview_common.c
--- client/mapview_common.c 2003/10/01 10:30:56 1.63
+++ client/mapview_common.c 2003/10/01 16:38:03
@@ -312,7 +312,7 @@
int *xsize, int *ysize)
{
*xmin = *ymin = 0;
- *xmax = map.xsize;
+ *xmax = map.xsize + mapview_canvas.tile_width;
*ymax = map.ysize + EXTRA_BOTTOM_ROW;
*xsize = mapview_canvas.tile_width;
*ysize = mapview_canvas.tile_height;
@@ -337,7 +337,7 @@
get_mapview_scroll_window(&xmin, &ymin, &xmax, &ymax, &xsize, &ysize);
native_to_map_pos(&x0, &y0, scroll_x, scroll_y);
- x0 = CLIP(xmin, x0, xmax - xsize);
+ x0 = map_adjust_x(x0);
y0 = CLIP(ymin, y0, ymax - ysize);
if (x0 != mapview_canvas.map_x0 || y0 != mapview_canvas.map_y0) {
|
|