Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] minimap city colors?
Home

[Freeciv-Dev] minimap city colors?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] minimap city colors?
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Mon, 19 Jun 2000 21:50:58 +1000 (EST)

A city and unit visibility fix of June 7 changed the way cities
are colored in the minimap, such that the minimap color no longer
indicates the city occupied status, but instead cities are always 
a different color to units.

Was that deliberate?  If not, a simple patch such as the following
would restore the old behaviour, though with fog of war I'm not
actually sure the old behaviour is best, since most enemy cities 
look unoccupied simply due to fog (see previous discussion...)

-- David
--- freeciv-cvs/client/tilespec.c       Mon Jun 19 16:00:02 2000
+++ freeciv-mod/client/tilespec.c       Mon Jun 19 21:38:38 2000
@@ -1286,10 +1286,11 @@
   if(!ptile->known) {
     color=COLOR_STD_BLACK;
   } else if((pcity=map_get_city(x, y))) {
+    int occupied = unit_list_size(&ptile->units);     /* same as for flag */
     if(pcity->owner==game.player_idx)
-      color=COLOR_STD_WHITE;
+      color = occupied ? COLOR_STD_YELLOW : COLOR_STD_WHITE;
     else
-      color=COLOR_STD_CYAN;
+      color = occupied ? COLOR_STD_RED : COLOR_STD_CYAN;
   } else if ((punit=find_visible_unit(ptile))) {
     if(punit->owner==game.player_idx)
       color=COLOR_STD_YELLOW;

[Prev in Thread] Current Thread [Next in Thread]