Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] (PR#4138) Map decorations
Home

[Freeciv-Dev] (PR#4138) Map decorations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#4138) Map decorations
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Jun 2004 16:51:28 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [rfalke - Sat May 03 13:51:57 2003]:
> 
> 
> Attached is an updated version of the map decoration patch. Also
> included in this patch is the client goto patch (cc10.diff). The goto
> is adapted to use the new map decoration.

This patch is too big to speak for itself.  Can you explain what it is
supposed to do, and how?

- What type of decorations can you get?  Is the idea to extensibly
support further decorations?

- How are decorations stored?  At a glance it looks like one array holds
all decorations.  To find out if a decoration exists at a certain tile
we have to loop over all decorations on all tiles.  This seems bad to me
- it would be better to have one decoration_list per tile (in a climap
structure).

> There are some problems:
>  - speed: while the code tries to reduce the number of updates the
>  freeciv code changed and now uses the new flush code. Jason: Should
>  the decorations drawn into the store or onto the screen? Where and
>  when should draw_global_map_decorations be called? What should be
>  called if I want to remove an already drawn decoration? 

The decorations should be drawn into the store. 
draw_global_map_decorations should be called at the end up
update_map_canvas and need only draw decorations within a specific
canvas range.  (If you're only updating one tile you don't want to draw
all decorations on the map!  Although this wouldn't cause an error it
would be quite slow.)

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#4138) Map decorations, Jason Short <=