Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13045) remove get_grid_color
Home

[Freeciv-Dev] (PR#13045) remove get_grid_color

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13045) remove get_grid_color
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 May 2005 13:48:37 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13045 >

The get_grid_color function is unused and deprecated.  THis patch
removes it.  I will commit immediately.

-jason

? colors.diff
? common/team.c
? common/team.h
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.236
diff -u -r1.236 mapview_common.c
--- client/mapview_common.c     11 May 2005 20:35:29 -0000      1.236
+++ client/mapview_common.c     11 May 2005 20:46:52 -0000
@@ -117,39 +117,6 @@
   }
 }
 
-/**************************************************************************
-Returns the color the grid should have between tile (x1,y1) and
-(x2,y2).
-**************************************************************************/
-enum color_std get_grid_color(const struct tile *tile1, enum direction8 dir)
-{
-  enum city_tile_type city_tile_type1, city_tile_type2;
-  struct city *dummy_pcity;
-  bool pos1_is_in_city_radius;
-  bool pos2_is_in_city_radius = FALSE;
-  struct tile *tile2;
-
-  if (!(tile2 = mapstep(tile1, dir))) {
-    return COLOR_STD_BLACK;
-  }
-
-  pos1_is_in_city_radius = player_in_city_radius(game.player_ptr, tile1);
-  pos2_is_in_city_radius = player_in_city_radius(game.player_ptr, tile2);
-
-  if (!pos1_is_in_city_radius && !pos2_is_in_city_radius) {
-    return COLOR_STD_BLACK;
-  }
-
-  get_worker_on_map_position(tile1, &city_tile_type1, &dummy_pcity);
-  get_worker_on_map_position(tile2, &city_tile_type2, &dummy_pcity);
-
-  if (city_tile_type1 == C_TILE_WORKER || city_tile_type2 == C_TILE_WORKER) {
-    return COLOR_STD_RED;
-  } else {
-    return COLOR_STD_WHITE;
-  }
-}
-
 /****************************************************************************
   Translate from a cartesian system to the GUI system.  This function works
   on vectors, meaning it can be passed a (dx,dy) pair and will return the
Index: client/mapview_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.h,v
retrieving revision 1.112
diff -u -r1.112 mapview_common.h
--- client/mapview_common.h     24 Apr 2005 23:10:32 -0000      1.112
+++ client/mapview_common.h     11 May 2005 20:46:53 -0000
@@ -218,8 +218,6 @@
 void refresh_city_mapcanvas(struct city *pcity, struct tile *ptile,
                            bool full_refresh, bool write_to_screen);
 
-enum color_std get_grid_color(const struct tile *ptile, enum direction8 dir);
-
 void map_to_gui_vector(const struct tileset *t,
                       int *gui_dx, int *gui_dy, int map_dx, int map_dy);
 bool tile_to_canvas_pos(int *canvas_x, int *canvas_y, struct tile *ptile);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13045) remove get_grid_color, Jason Short <=