Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12528) draw focus unit on top
Home

[Freeciv-Dev] (PR#12528) draw focus unit on top

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12528) draw focus unit on top
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Mar 2005 13:24:28 -0800
Reply-to: bugs@xxxxxxxxxxx

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

This patch draws the focus unit in a separate layer from other units. 
This layer is much higher up, so it will be drawn on top of overlays and 
fog (of course the overlay unit should be unaffected by fog).

Eventually the citybar should be drawn at about the same layer as overlays.

-jason

Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.268
diff -u -r1.268 tilespec.c
--- client/tilespec.c   16 Mar 2005 19:30:37 -0000      1.268
+++ client/tilespec.c   16 Mar 2005 21:22:31 -0000
@@ -3485,7 +3485,9 @@
     break;
 
   case LAYER_UNIT:
-    if (do_draw_unit) {
+  case LAYER_FOCUS_UNIT:
+    if (do_draw_unit && XOR(layer == LAYER_UNIT,
+                           punit == get_unit_in_focus())) {
       bool stacked = ptile && (unit_list_size(ptile->units) > 1);
       bool backdrop = !pcity;
 
Index: client/tilespec.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.h,v
retrieving revision 1.129
diff -u -r1.129 tilespec.h
--- client/tilespec.h   16 Mar 2005 19:30:38 -0000      1.129
+++ client/tilespec.h   16 Mar 2005 21:22:31 -0000
@@ -74,6 +74,7 @@
   LAYER_SPECIAL3,
   LAYER_GRID2,
   LAYER_OVERLAYS,
+  LAYER_FOCUS_UNIT,
   LAYER_GOTO,
   LAYER_COUNT
 };

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12528) draw focus unit on top, Jason Short <=