Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] patch: white grid in isometric view (gtk client)
Home

[Freeciv-Dev] patch: white grid in isometric view (gtk client)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] patch: white grid in isometric view (gtk client)
From: Martin Douda <martin@xxxxxxxxx>
Date: Sat, 7 Jul 2001 17:19:19 +0200 (CEST)

Hi, all.
Here is the patch to whitening grid near cities in isometric view like
it is in normal view.

                        Martin



--- ../freeciv-1.11.6-orig/client/gui-gtk/mapview.c     Wed May 23 19:21:18 2001
+++ ./client/gui-gtk/mapview.c  Sat Jul  7 17:00:59 2001
@@ -2338,11 +2338,28 @@
   if (draw_map_grid) {
     /* we draw the 2 lines on top of the tile; the buttom lines will be
        drawn by the tiles underneath. */
-    gdk_gc_set_foreground(thin_line_gc, colors_standard[COLOR_STD_BLACK]);
+
+
+    int here_in_radius = player_in_city_radius(game.player_ptr, x, y);
+
+    if ((map_get_tile(x, y-1))->known &&
+       ((here_in_radius ||
+          player_in_city_radius(game.player_ptr, x, y-1)))) {
+       gdk_gc_set_foreground(thin_line_gc, colors_standard[COLOR_STD_WHITE]);
+    } else {
+       gdk_gc_set_foreground(thin_line_gc, colors_standard[COLOR_STD_BLACK]);
+    }
     if (draw & D_M_R)
       gdk_draw_line(pm, thin_line_gc,
                    canvas_x+NORMAL_TILE_WIDTH/2, canvas_y,
                    canvas_x+NORMAL_TILE_WIDTH, canvas_y+NORMAL_TILE_HEIGHT/2);
+    if ((map_get_tile(x-1, y))->known &&
+       ((here_in_radius ||
+          player_in_city_radius(game.player_ptr, x-1, y)))) {
+       gdk_gc_set_foreground(thin_line_gc, colors_standard[COLOR_STD_WHITE]);
+    } else {
+       gdk_gc_set_foreground(thin_line_gc, colors_standard[COLOR_STD_BLACK]);
+    }
     if (draw & D_M_L)
       gdk_draw_line(pm, thin_line_gc,
                    canvas_x, canvas_y + NORMAL_TILE_HEIGHT/2,

--------------------------------------------------------------------------------
                              Martin "MaD" Douda
WEB: http://martin.douda.net/   PHONE:+420603752779   ICQ# 86467013
EMAIL: <martin@xxxxxxxxx>, <mad@xxxxxxxxxxxxx> (160 characters only)
PGP:ID=0x6FE43023 Fingerprint:E495 11DA EF6E 0DD6 965A 54F3 888E CC9E 6FE4 3023
--------------------------------------------------------------------------------
Hardware: The parts of a computer system that can be kicked.



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] patch: white grid in isometric view (gtk client), Martin Douda <=