Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] (PR#9022) don't draw stacked sprite twice
Home

[Freeciv-Dev] (PR#9022) don't draw stacked sprite twice

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9022) don't draw stacked sprite twice
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 08:59:25 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9022 >

The stacked sprite (sprite for stacked or occupied units) is drawn 
twice.  It's added to the sprite list in fill_unit_sprite_array in 
tilespec.c.  And it's drawn on top a second time in put_unit (which 
calls fill_unit_sprite_array and has already drawn it once from the list).

jason

? gmon.out
? profile
? profile-new
? profile-orig
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.127
diff -u -r1.127 mapview_common.c
--- client/mapview_common.c     17 Jun 2004 19:45:03 -0000      1.127
+++ client/mapview_common.c     18 Jun 2004 15:57:38 -0000
@@ -734,12 +734,6 @@
                        unit_width, unit_height);
     }
   }
-
-  if (punit->occupy != 0) {
-    canvas_put_sprite(pcanvas, canvas_x, canvas_y,
-                     sprites.unit.stack,
-                     unit_offset_x, unit_offset_y, unit_width, unit_height);
-  }
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9022) don't draw stacked sprite twice, Jason Short <=