Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] Re: (PR#12350) solid unit background color not working wit
Home

[Freeciv-Dev] Re: (PR#12350) solid unit background color not working wit

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: matzjosh-freeciv@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12350) solid unit background color not working with iso tilesets
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 26 Feb 2005 17:03:12 -0800
Reply-to: bugs@xxxxxxxxxxx

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

Jason Short wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12350 >
> 
> This patch fixes it for the dev branch.  A simpler fix is probably
> needed for 2.0.

And here is a patch for 2.0.

-jason

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.151.2.16
diff -u -r1.151.2.16 mapview_common.c
--- client/mapview_common.c     26 Feb 2005 18:27:18 -0000      1.151.2.16
+++ client/mapview_common.c     27 Feb 2005 01:02:38 -0000
@@ -851,8 +851,9 @@
     case DRAWN_BG:
       /*** Background color. ***/
       if (is_isometric) {
-       canvas_fill_sprite_area(pcanvas, sprites.black_tile, COLOR_STD_BLACK,
-                           canvas_x, canvas_y);
+       canvas_fill_sprite_area(pcanvas, sprites.black_tile,
+                               pdrawn[i].data.bg.color,
+                               canvas_x, canvas_y);
        if (fog) {
          canvas_fog_sprite_area(pcanvas, sprites.black_tile,
                                 canvas_x, canvas_y);
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.204.2.16
diff -u -r1.204.2.16 tilespec.c
--- client/tilespec.c   26 Feb 2005 18:40:20 -0000      1.204.2.16
+++ client/tilespec.c   27 Feb 2005 01:02:39 -0000
@@ -1971,19 +1971,12 @@
   struct drawn_sprite *save_sprs = sprs;
   int ihp;
 
-  if (is_isometric) {
-    if (backdrop) {
+  if (backdrop) {
+    if (!solid_color_behind_units) {
       ADD_SPRITE(get_unit_nation_flag_sprite(punit),
                 DRAW_FULL, TRUE, flag_offset_x, flag_offset_y);
-    }
-  } else {
-    if (backdrop) {
-      if (!solid_color_behind_units) {
-       ADD_SPRITE(get_unit_nation_flag_sprite(punit),
-                  DRAW_FULL, TRUE, flag_offset_x, flag_offset_y);
-      } else {
-       ADD_BG(player_color(unit_owner(punit)));
-      }
+    } else {
+      ADD_BG(player_color(unit_owner(punit)));
     }
   }
 
@@ -2745,6 +2738,8 @@
     if (!solid_color_behind_units) {
       ADD_SPRITE(get_city_nation_flag_sprite(pcity),
                 DRAW_FULL, TRUE, flag_offset_x, flag_offset_y);
+    } else {
+      ADD_BG(player_color(city_owner(pcity)));
     }
     ADD_SPRITE_FULL(get_city_sprite(pcity));
     if (pcity->client.occupied) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#12350) solid unit background color not working with iso tilesets, Jason Short <=