Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#12945) better overview colors
Home

[Freeciv-Dev] (PR#12945) better overview colors

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12945) better overview colors
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 6 Jun 2005 14:50:59 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Here's an updated version of the patch.  This adds separate colors
(controlled in the tileset) for allied units and cities.  I didn't
really know what colors to make them so I made them the same as the
owned units and cities.  However this can easily be changed by the artists.

-jason

Index: client/colors_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/colors_common.c,v
retrieving revision 1.5
diff -u -r1.5 colors_common.c
--- client/colors_common.c      22 May 2005 18:12:52 -0000      1.5
+++ client/colors_common.c      6 Jun 2005 21:49:29 -0000
@@ -56,8 +56,10 @@
   /* Overview */
   "overview_unknown",
   "overview_mycity",
+  "overview_alliedcity",
   "overview_enemycity",
   "overview_myunit",
+  "overview_alliedunit",
   "overview_enemyunit",
   "overview_ocean",
   "overview_foggedocean",
Index: client/colors_common.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/colors_common.h,v
retrieving revision 1.5
diff -u -r1.5 colors_common.h
--- client/colors_common.h      22 May 2005 18:12:52 -0000      1.5
+++ client/colors_common.h      6 Jun 2005 21:49:29 -0000
@@ -39,8 +39,10 @@
   /* Overview colors */
   COLOR_OVERVIEW_UNKNOWN, /* Black */
   COLOR_OVERVIEW_MY_CITY, /* white */
+  COLOR_OVERVIEW_ALLIED_CITY,
   COLOR_OVERVIEW_ENEMY_CITY, /* cyan */
   COLOR_OVERVIEW_MY_UNIT, /* yellow */
+  COLOR_OVERVIEW_ALLIED_UNIT,
   COLOR_OVERVIEW_ENEMY_UNIT, /* red */
   COLOR_OVERVIEW_OCEAN, /* ocean/blue */
   COLOR_OVERVIEW_FOGGED_OCEAN, /* race4/dark blue */
Index: client/overview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/overview_common.c,v
retrieving revision 1.10
diff -u -r1.10 overview_common.c
--- client/overview_common.c    22 May 2005 18:12:52 -0000      1.10
+++ client/overview_common.c    6 Jun 2005 21:49:29 -0000
@@ -110,12 +110,18 @@
   } else if ((pcity = tile_get_city(ptile))) {
     if (pcity->owner == game.info.player_idx) {
       return COLOR_OVERVIEW_MY_CITY;
+    } else if (pplayers_allied(city_owner(pcity), game.player_ptr)) {
+      /* Includes teams. */
+      return COLOR_OVERVIEW_ALLIED_CITY;
     } else {
       return COLOR_OVERVIEW_ENEMY_CITY;
     }
   } else if ((punit = find_visible_unit(ptile))) {
     if (punit->owner == game.info.player_idx) {
       return COLOR_OVERVIEW_MY_UNIT;
+    } else if (pplayers_allied(unit_owner(punit), game.player_ptr)) {
+      /* Includes teams. */
+      return COLOR_OVERVIEW_ALLIED_UNIT;
     } else {
       return COLOR_OVERVIEW_ENEMY_UNIT;
     }
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.308
diff -u -r1.308 tilespec.c
--- client/tilespec.c   4 Jun 2005 01:52:25 -0000       1.308
+++ client/tilespec.c   6 Jun 2005 21:49:30 -0000
@@ -386,7 +386,7 @@
 
 struct tileset *tileset;
 
-#define TILESPEC_CAPSTR "+tilespec3 duplicates_ok +Freeciv.Devel.2005.May.21"
+#define TILESPEC_CAPSTR "+tilespec3 duplicates_ok +Freeciv.Devel.2005.Jun.6"
 /*
  * Tilespec capabilities acceptable to this program:
  *
Index: data/isophex.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isophex.tilespec,v
retrieving revision 1.17
diff -u -r1.17 isophex.tilespec
--- data/isophex.tilespec       22 May 2005 18:12:54 -0000      1.17
+++ data/isophex.tilespec       6 Jun 2005 21:49:30 -0000
@@ -2,7 +2,7 @@
 [tilespec]
 
 ; Format and options of this tilespec file:
-options = "+tilespec3 +Freeciv.Devel.2005.May.21"
+options = "+tilespec3 +Freeciv.Devel.2005.Jun.6"
 
 ; A simple name for the tileset specified by this file:
 name = "isophex"
Index: data/isotrident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident.tilespec,v
retrieving revision 1.40
diff -u -r1.40 isotrident.tilespec
--- data/isotrident.tilespec    22 May 2005 18:12:54 -0000      1.40
+++ data/isotrident.tilespec    6 Jun 2005 21:49:30 -0000
@@ -2,7 +2,7 @@
 [tilespec]
 
 ; Format and options of this tilespec file:
-options = "+tilespec3 +Freeciv.Devel.2005.May.21"
+options = "+tilespec3 +Freeciv.Devel.2005.Jun.6"
 
 ; A simple name for the tileset specified by this file:
 name = "MacroIsoTrident"
Index: data/trident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident.tilespec,v
retrieving revision 1.41
diff -u -r1.41 trident.tilespec
--- data/trident.tilespec       28 May 2005 21:15:42 -0000      1.41
+++ data/trident.tilespec       6 Jun 2005 21:49:30 -0000
@@ -2,7 +2,7 @@
 [tilespec]
 
 ; Format and options of this tilespec file:
-options = "+tilespec3 +Freeciv.Devel.2005.May.21"
+options = "+tilespec3 +Freeciv.Devel.2005.Jun.6"
 
 ; A simple name for the tileset specified by this file:
 name = "Trident"
Index: data/misc/colors.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/misc/colors.tilespec,v
retrieving revision 1.1
diff -u -r1.1 colors.tilespec
--- data/misc/colors.tilespec   22 May 2005 18:12:54 -0000      1.1
+++ data/misc/colors.tilespec   6 Jun 2005 21:49:30 -0000
@@ -47,12 +47,18 @@
 overview_mycity = {"r", "g", "b"
     255, 255, 255
 }
+overview_alliedcity = {"r", "g", "b"
+    255, 255, 255
+}
 overview_enemycity = {"r", "g", "b"
     0,   255, 200
 }
 overview_myunit = {"r", "g", "b"
     255, 255,   0
 }
+overview_alliedunit = {"r", "g", "b"
+    255, 255, 255
+}
 overview_enemyunit = {"r", "g", "b"
     255,   0,   0
 }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12945) better overview colors, Jason Short <=