Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2533) unification of move_unit_map_canvas
Home

[Freeciv-Dev] Re: (PR#2533) unification of move_unit_map_canvas

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2533) unification of move_unit_map_canvas
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 17 Dec 2002 16:28:34 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, 2002-12-17 at 14:19, Raimar Falke via RT wrote:
> On Tue, Dec 10, 2002 at 02:12:47AM -0800, Jason Short via RT wrote:
> > 
> > [jdorje - Tue Dec 10 10:11:17 2002]:
> > 
> > > This function moves move_unit_map_canvas into mapview_common.  A new GUI
> > > function, draw_unit_animation_frame, is created in its place.
> > 
> > Patch attached.
> 
> The patch ok except one thing: what is the propose of
> single_tile_pixmap_width? Why was it added? Why do you use it?

single_tile_pixmap_width/single_tile_pixmap_height are currently used as
the width and height of the single_tile_pixmap pixmap (which is a
secondary backing store used only for animations).  But these are always
UNIT_TILE_WIDTH/UNIT_TILE_HEIGHT, so there's not much reason for their
existence.

To accelerate the graphics here we should NOT redraw the unit pixmap
each time, but should do what the SDL client does by assembling this
sprite at the beginning of the animation.  If this is done with
common-code support:

  struct Spite *create_unit_sprite(struct unit *punit);

then we can provide this support natively, and unify this animation with
the other animation functions (so we just animate a single sprite). 
This could come in very handy if we ever try for more complex
animations.

But IMO all of this is outside the scope of this patch.

jason




[Prev in Thread] Current Thread [Next in Thread]