Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9529) Patch: remove draw_diagonal_roads option
Home

[Freeciv-Dev] (PR#9529) Patch: remove draw_diagonal_roads option

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9529) Patch: remove draw_diagonal_roads option
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Jul 2004 12:08:06 -0700
Reply-to: rt@xxxxxxxxxxx

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

This patch removes the draw_diagonal_roads client option.  It is just 
clutter.  The impact on the user (by having to glance past a useless 
option) is probably worse than that on the code (of having to support 
this useless option).

jason

Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.100
diff -u -r1.100 options.c
--- client/options.c    20 Jul 2004 16:27:07 -0000      1.100
+++ client/options.c    28 Jul 2004 19:06:49 -0000
@@ -61,7 +61,6 @@
 bool auto_center_on_unit = TRUE;
 bool auto_center_on_combat = FALSE;
 bool wakeup_focus = TRUE;
-bool draw_diagonal_roads = TRUE;
 bool center_when_popup_city = TRUE;
 bool concise_city_production = FALSE;
 bool auto_turn_done = FALSE;
@@ -101,7 +100,6 @@
   GEN_BOOL_OPTION(auto_center_on_unit,      N_("Auto Center on Units")),
   GEN_BOOL_OPTION(auto_center_on_combat,    N_("Auto Center on Combat")),
   GEN_BOOL_OPTION(wakeup_focus,             N_("Focus on Awakened Units")),
-  GEN_BOOL_OPTION(draw_diagonal_roads,      N_("Draw Diagonal Roads/Rails")),
   GEN_BOOL_OPTION(center_when_popup_city,   N_("Center map when Popup city")),
   GEN_BOOL_OPTION(concise_city_production,  N_("Concise City Production")),
   GEN_BOOL_OPTION(auto_turn_done,           N_("End Turn when done moving")),
Index: client/options.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.h,v
retrieving revision 1.37
diff -u -r1.37 options.h
--- client/options.h    3 Apr 2004 01:57:22 -0000       1.37
+++ client/options.h    28 Jul 2004 19:06:49 -0000
@@ -35,7 +35,6 @@
 extern bool auto_center_on_unit;
 extern bool auto_center_on_combat;
 extern bool wakeup_focus;
-extern bool draw_diagonal_roads;
 extern bool center_when_popup_city;
 extern bool concise_city_production;
 extern bool auto_turn_done;
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.192
diff -u -r1.192 tilespec.c
--- client/tilespec.c   28 Jul 2004 16:45:03 -0000      1.192
+++ client/tilespec.c   28 Jul 2004 19:06:50 -0000
@@ -2060,11 +2060,6 @@
   int i;
 
   assert(draw_roads_rails);
-  if (!(draw_diagonal_roads || is_isometric)) {
-    /* We're not supposed to draw roads/rails here. */
-    /* HACK: draw_diagonal_roads is not checked in iso view. */
-    return 0;
-  }
 
   /* Roads going diagonally adjacent to this tile need to be
    * partly drawn on this tile. */
@@ -2109,11 +2104,6 @@
   int i;
 
   assert(draw_roads_rails);
-  if (!(draw_diagonal_roads || is_isometric)) {
-    /* We're not supposed to draw roads/rails here. */
-    /* HACK: draw_diagonal_roads is not checked in iso view. */
-    return 0;
-  }
 
   /* Rails going diagonally adjacent to this tile need to be
    * partly drawn on this tile. */
@@ -2171,18 +2161,11 @@
     road_near[dir] = contains_special(tspecial_near[dir], S_ROAD);
     rail_near[dir] = contains_special(tspecial_near[dir], S_RAILROAD);
 
-    if (draw_diagonal_roads
-       || is_cardinal_tileset_dir(map_to_gui_dir(dir))) {
-      /* Draw rail/road if there is a connection from this tile to the
-       * adjacent tile.  But don't draw road if there is also a rail
-       * connection. */
-      draw_rail[dir] = rail && rail_near[dir];
-      draw_road[dir] = road && road_near[dir] && !draw_rail[dir];
-    } else {
-      /* Don't draw diagonal roads/rails if draw_diagonal_roads isn't set. */
-      draw_road[dir] = FALSE;
-      draw_rail[dir] = FALSE;
-    }
+    /* Draw rail/road if there is a connection from this tile to the
+     * adjacent tile.  But don't draw road if there is also a rail
+     * connection. */
+    draw_rail[dir] = rail && rail_near[dir];
+    draw_road[dir] = road && road_near[dir] && !draw_rail[dir];
 
     /* Don't draw an isolated road/rail if there's any connection. */
     draw_single_rail &= !draw_rail[dir];

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9529) Patch: remove draw_diagonal_roads option, Jason Short <=