Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12535) remove last public named_sprites reference
Home

[Freeciv-Dev] (PR#12535) remove last public named_sprites reference

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12535) remove last public named_sprites reference
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Mar 2005 17:04:29 -0800
Reply-to: bugs@xxxxxxxxxxx

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

This patch removes the last public (outside of tilespec.c) reference to 
the named_sprites array.

Rather than add an accessor I just simplified the code so that it's not 
needed.  This means the select-unit animation draws the full UNIT_TILE 
area rather than just the NORMAL_TILE area.  IMO this is not a big deal 
(if it is we can add back the optimization).

-jason

Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.162
diff -u -r1.162 control.c
--- client/control.c    14 Mar 2005 20:26:24 -0000      1.162
+++ client/control.c    18 Mar 2005 01:02:42 -0000
@@ -430,13 +430,7 @@
        * new blink_time on every update. */
       blink_timer = renew_timer_start(blink_timer, TIMER_USER, TIMER_ACTIVE);
 
-      /* HACK: since this is called so often we're careful to only do the
-       * minimal refresh. */
-      if (sprites.unit.select[0]) {
-       refresh_tile_mapcanvas(punit->tile, FALSE, TRUE);
-      } else {
-       refresh_unit_mapcanvas(punit, punit->tile, FALSE, TRUE);
-      }
+      refresh_unit_mapcanvas(punit, punit->tile, FALSE, TRUE);
     }
 
     return blink_time - read_timer_seconds(blink_timer);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12535) remove last public named_sprites reference, Jason Short <=