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

Attached patch moves the unit and special3 (fortress
foreground) layers under the fog layer, the restrictions
being that the unit layer has to be before special3,
special3 before fog, and city2 after fog.

The unit layer can be drawn "under" the fog layer since
fog will never be drawn in tiles with vision (e.g. those
with units).


-----------------------------------------------------------------------
生きるものを誘拐することは宇宙人の文化だよ。
diff --git a/client/tilespec.c b/client/tilespec.c
index f8c5309..9f43d41 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -4433,22 +4433,6 @@ int fill_sprite_array(struct tileset *t,
     }
     break;
 
-  case LAYER_FOG:
-    sprs += fill_fog_sprite_array(t, sprs, ptile, pedge, pcorner);
-    break;
-
-  case LAYER_CITY2:
-    /* City size.  Drawing this under fog makes it hard to read. */
-    if (pcity && draw_cities && !draw_full_citybar) {
-      if (pcity->size >= 10) {
-	ADD_SPRITE(t->sprites.city.size_tens[pcity->size / 10],
-		   FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
-      }
-      ADD_SPRITE(t->sprites.city.size[pcity->size % 10],
-		 FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
-    }
-    break;
-
   case LAYER_UNIT:
   case LAYER_FOCUS_UNIT:
     if (do_draw_unit && XOR(layer == LAYER_UNIT, unit_is_in_focus(punit))) {
@@ -4481,6 +4465,22 @@ int fill_sprite_array(struct tileset *t,
     }
     break;
 
+  case LAYER_FOG:
+    sprs += fill_fog_sprite_array(t, sprs, ptile, pedge, pcorner);
+    break;
+
+  case LAYER_CITY2:
+    /* City size.  Drawing this under fog makes it hard to read. */
+    if (pcity && draw_cities && !draw_full_citybar) {
+      if (pcity->size >= 10) {
+	ADD_SPRITE(t->sprites.city.size_tens[pcity->size / 10],
+		   FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
+      }
+      ADD_SPRITE(t->sprites.city.size[pcity->size % 10],
+		 FALSE, FULL_TILE_X_OFFSET, FULL_TILE_Y_OFFSET);
+    }
+    break;
+
   case LAYER_GRID2:
     if (!t->is_isometric) {
       sprs += fill_grid_sprite_array(t, sprs, ptile, pedge, pcorner,
diff --git a/client/tilespec.h b/client/tilespec.h
index e96f406..e1d9fbd 100644
--- a/client/tilespec.h
+++ b/client/tilespec.h
@@ -79,10 +79,10 @@ enum mapview_layer {
   LAYER_GRID1,
   LAYER_CITY1,
   LAYER_SPECIAL2,
-  LAYER_FOG,
-  LAYER_CITY2,
   LAYER_UNIT,
   LAYER_SPECIAL3,
+  LAYER_FOG,
+  LAYER_CITY2,
   LAYER_GRID2,
   LAYER_OVERLAYS,
   LAYER_CITYBAR,
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to