[Freeciv-Dev] (PR#12945) better overview colors
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12945 >
This patch improves (slightly) the colors of tiles/units/cities in the
overview. It draws allied and team tiles using slightly more neutral
colors than are used for enemy and unallied tiles.
-jason
Index: client/overview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/overview_common.c,v
retrieving revision 1.5
diff -u -r1.5 overview_common.c
--- client/overview_common.c 24 Apr 2005 23:10:32 -0000 1.5
+++ client/overview_common.c 30 Apr 2005 22:51:07 -0000
@@ -110,26 +110,32 @@
} else if ((pcity = tile_get_city(ptile))) {
if (pcity->owner == game.player_idx) {
return COLOR_STD_WHITE;
+ } if (pplayers_allied(city_owner(pcity), game.player_ptr)) {
+ /* Includes teams. */
+ return COLOR_STD_OFFWHITE;
} else {
return COLOR_STD_CYAN;
}
} else if ((punit = find_visible_unit(ptile))) {
if (punit->owner == game.player_idx) {
return COLOR_STD_YELLOW;
+ } if (pplayers_allied(unit_owner(punit), game.player_ptr)) {
+ /* Includes teams. */
+ return COLOR_STD_ORANGE;
} else {
return COLOR_STD_RED;
}
} else if (is_ocean(ptile->terrain)) {
if (tile_get_known(ptile) == TILE_KNOWN_FOGGED && draw_fog_of_war) {
- return COLOR_STD_RACE4;
+ return COLOR_STD_DARK_BLUE;
} else {
- return COLOR_STD_OCEAN;
+ return COLOR_STD_BLUE;
}
} else {
if (tile_get_known(ptile) == TILE_KNOWN_FOGGED && draw_fog_of_war) {
- return COLOR_STD_BACKGROUND;
+ return COLOR_STD_DARK_GRAY;
} else {
- return COLOR_STD_GROUND;
+ return COLOR_STD_GREEN;
}
}
}
Index: client/include/colors_g.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/include/colors_g.h,v
retrieving revision 1.9
diff -u -r1.9 colors_g.h
--- client/include/colors_g.h 12 Mar 2004 04:57:52 -0000 1.9
+++ client/include/colors_g.h 30 Apr 2005 22:51:07 -0000
@@ -27,6 +27,13 @@
COLOR_STD_LAST
};
+#define COLOR_STD_BLUE COLOR_STD_OCEAN
+#define COLOR_STD_DARK_BLUE COLOR_STD_RACE4
+#define COLOR_STD_DARK_GRAY COLOR_STD_BACKGROUND
+#define COLOR_STD_GREEN COLOR_STD_GROUND
+#define COLOR_STD_ORANGE COLOR_STD_RACE6
+#define COLOR_STD_OFFWHITE COLOR_STD_RACE13
+
enum line_type {
LINE_NORMAL, LINE_BORDER, LINE_TILE_FRAME, LINE_GOTO
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12945) better overview colors,
Jason Short <=
|
|