Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#8566) error in borders drawing
Home

[Freeciv-Dev] (PR#8566) error in borders drawing

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8566) error in borders drawing
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Apr 2004 11:53:47 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8566 >

There's a logical error in tile_draw_borders causing borders to not be 
drawn properly in iso-view.  This patch fixes it.

jason

? jason game.gz
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.103
diff -u -r1.103 mapview_common.c
--- client/mapview_common.c     20 Apr 2004 19:56:16 -0000      1.103
+++ client/mapview_common.c     21 Apr 2004 18:53:00 -0000
@@ -939,7 +939,7 @@
   struct player *this_owner = map_get_owner(map_x, map_y), *adjc_owner;
   int start_x, start_y, end_x, end_y;
 
-  if (!draw_borders || game.borders == 0 || !this_owner) {
+  if (!draw_borders || game.borders == 0) {
     return;
   }
 
@@ -952,7 +952,8 @@
      * to do the drawing in layers rather than per-tile.  In the meantime
      * we use this hack. */
     adjc_dir_iterate(map_x, map_y, adjc_x, adjc_y, dir) {
-      if (dir < 4
+      if ((dir == DIR8_WEST || dir == DIR8_NORTHWEST
+          || dir == DIR8_NORTH || dir == DIR8_NORTHEAST)
          && get_tile_boundaries(dir, 0, BORDER_WIDTH, draw,
                                  &start_x, &start_y, &end_x, &end_y)
          && tile_get_known(adjc_x, adjc_y)
@@ -971,6 +972,9 @@
       }
     } adjc_dir_iterate_end;
   } else {
+    if (!this_owner) {
+      return;
+    }
     adjc_dir_iterate(map_x, map_y, adjc_x, adjc_y, dir) {
       if (get_tile_boundaries(dir, 0, BORDER_WIDTH, draw,
                              &start_x, &start_y, &end_x, &end_y)

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8566) error in borders drawing, Jason Short <=