Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: remove map_canvas_adjust_[xy] (PR#1129)
Home

[Freeciv-Dev] Re: remove map_canvas_adjust_[xy] (PR#1129)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: remove map_canvas_adjust_[xy] (PR#1129)
From: Jason Short <vze2zq63@xxxxxxxxxxx>
Date: Tue, 18 Dec 2001 14:34:56 -0500
Reply-to: jdorje@xxxxxxxxxxxx

This is an update of the map_canvas_adjust_xy patch for current CVS. It's very small now :-).

All the original comments still apply.

jason

? jason.gz
? old
? topology
Index: client/gui-beos/mapview.cpp
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-beos/mapview.cpp,v
retrieving revision 1.3
diff -u -r1.3 mapview.cpp
--- client/gui-beos/mapview.cpp 2001/12/13 15:42:25     1.3
+++ client/gui-beos/mapview.cpp 2001/12/18 19:32:04
@@ -7,25 +7,6 @@
 #include "mapview.h"
 
 int
-map_canvas_adjust_x(int x)     // HOOK
-{
-       // @@@@ will probably require some direct accesses
-       NOT_FINISHED( "map_canvas_adjust_x(int" );
-       return 0;
-}
-
-
-int
-map_canvas_adjust_y(int y)     // HOOK
-{
-       // @@@@ will probably require some direct accesses
-       NOT_FINISHED( "map_canvas_adjust_y(int" );
-       return 0;
-}
-
-
-
-int
 tile_visible_mapcanvas(int x, int y)   // HOOK
 {
        // @@@@ will probably require some direct accesses
Index: client/gui-mui/mapclass.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-mui/mapclass.c,v
retrieving revision 1.70
diff -u -r1.70 mapclass.c
--- client/gui-mui/mapclass.c   2001/12/08 15:15:52     1.70
+++ client/gui-mui/mapclass.c   2001/12/18 19:32:07
@@ -1194,7 +1194,7 @@
       {
        /* Draw City Workers */
        APTR cliphandle = MUI_AddClipping(muiRenderInfo(o), _mleft(o), 
_mtop(o), _mwidth(o), _mheight(o));
-       int color;
+       int color, is_real;
        int x,y;
        struct city *pcity = data->worker_pcity;
 
@@ -1206,8 +1206,13 @@
          if (data->worker_colornum == 3) data->worker_colornum = 0;
        }
 
-       x = map_canvas_adjust_x(pcity->x);
-       y = map_canvas_adjust_y(pcity->y);
+       /* This used to use map_canvas_adjust_[xy], but that system is
+          no good.  I've adjusted it to use a manual system instead. */
+       is_real = normalize_map_pos(&pcity->x, &pcity->y);
+       assert(is_real);
+       if (pcity->x < map_view_x0) {
+         pcity->x += map.xsize;
+       }
 
        SetAPen(_rp(o),color);
 
Index: client/gui-stub/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-stub/mapview.c,v
retrieving revision 1.9
diff -u -r1.9 mapview.c
--- client/gui-stub/mapview.c   2001/12/13 15:42:27     1.9
+++ client/gui-stub/mapview.c   2001/12/18 19:32:07
@@ -4,20 +4,6 @@
 
 
 int
-map_canvas_adjust_x(int x)
-{
-       /* PORTME */
-       return 0;
-}
-
-int
-map_canvas_adjust_y(int y)
-{
-       /* PORTME */
-       return 0;
-}
-
-int
 tile_visible_mapcanvas(int x, int y)
 {
        /* PORTME */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: remove map_canvas_adjust_[xy] (PR#1129), Jason Short <=