Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12817) a new layer for the citybar
Home

[Freeciv-Dev] (PR#12817) a new layer for the citybar

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12817) a new layer for the citybar
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Apr 2005 23:14:37 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This patch adds a new mapview layer, which is only used for the citybar.
 This means the citybar is drawn underneath the focus unit, which is
better since, well, it's the focus unit.  This is particularly important
with the enhanced citybar (PR#2708).

-jason

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.225
diff -u -r1.225 mapview_common.c
--- client/mapview_common.c     31 Mar 2005 17:28:02 -0000      1.225
+++ client/mapview_common.c     17 Apr 2005 06:12:04 -0000
@@ -1158,6 +1158,10 @@
                       canvas_x, canvas_y, width, height);
 
   mapview_layer_iterate(layer) {
+    if (layer == LAYER_CITYBAR) {
+      show_city_descriptions(canvas_x, canvas_y, width, height);
+      continue;
+    }
     gui_rect_iterate(gui_x0, gui_y0, width,
                     height + (tileset_is_isometric(tileset)
                               ? (tileset_tile_height(tileset) / 2) : 0),
@@ -1197,8 +1201,6 @@
     } adjc_dir_iterate_end;
   } gui_rect_iterate_end;
 
-  show_city_descriptions(canvas_x, canvas_y, width, height);
-
   if (!full) {
     /* Swap store and tmp_store back. */
     tmp = mapview.store;
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.293
diff -u -r1.293 tilespec.c
--- client/tilespec.c   15 Apr 2005 05:40:49 -0000      1.293
+++ client/tilespec.c   17 Apr 2005 06:12:05 -0000
@@ -3926,6 +3926,10 @@
     }
     break;
 
+  case LAYER_CITYBAR:
+    /* Nothing.  This is just a placeholder. */
+    break;
+
   case LAYER_GOTO:
     sprs += fill_goto_sprite_array(t, sprs, ptile, pedge, pcorner);
     break;
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.148
diff -u -r1.148 tilespec.h
--- client/tilespec.h   15 Apr 2005 05:08:09 -0000      1.148
+++ client/tilespec.h   17 Apr 2005 06:12:05 -0000
@@ -79,6 +79,7 @@
   LAYER_SPECIAL3,
   LAYER_GRID2,
   LAYER_OVERLAYS,
+  LAYER_CITYBAR,
   LAYER_FOCUS_UNIT,
   LAYER_GOTO,
   LAYER_COUNT

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12817) a new layer for the citybar, Jason Short <=