Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [RFC] Map decorations
Home

[Freeciv-Dev] Re: [RFC] Map decorations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel Sjölie <deepone@xxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] Map decorations
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 7 Oct 2001 18:25:00 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Oct 07, 2001 at 04:35:53PM +0200, Daniel Sjölie wrote:
> On 2001-10-07 12:07:53, Raimar Falke wrote:
> > 
> > This is a preparation for unit agents. It would be nice if for example
> > the SMA (settler management agent something like the current auto
> > settler function) can show which action a settler plans to carry out
> > and to show certain information. See the attached picture for an
> > example made with a drawing program (there is a settler in the south
> > east corner, it was just "blinked out" at the screenshot).
> > 
> > Another point is that the current way of drawing the goto line is very
> > ugly. The goto code calls the GUI code (if the line is started or
> > changes) and the GUI code calls the goto code (if the mapview is
> > refreshed).
> > 
> > So something like the following is useful IMHO:
> > 
> > struct map_decoration
> > {
> >   int elements_used;
> >   struct {
> >     int x,y;
> >     char *text;
> >     enum color_std line_color, text_color;
> >   } elements[MAX_MAP_DECORATIONS_ELEMENTS];
> > };
> > 
> > /*
> >  * Draws line between the centers of the tiles which are mentioned in
> >  * the elements fields. Note that the tiles doesn't have to be
> >  * adjacent. If a text is given this is drawn at the
> >  * tile. Returns an id.
> >  */
> > int add_map_decoration(struct map_decoration *p);
> > 
> > void remove_map_decoration(int id);
> > 
> > So the goto (or the SMA) code controls/calls the GUI code.
> > 
> > There may be extra modifiers for the text (position, size) and maybe
> > also multiple texts.
> 
> Yes, I think this concept could be extended like this in quite a few
> ways... (Eg, having small pixmaps or silimar)
> I think the idea is a really good one even as is though...
> It should be easy to build on later...

Lets not over-engineer this. The only other decoration currently used
are the city names and productions. But they are bigger than a
tile. It is complex to refresh them correctly. Even the current code
is buggy in this respect.

However there may be possible uses in the future. You may for example
visualize trade routes.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "These download files are in Microsoft Word 6.0 format. After
  unzipping, these files can be viewed in any text editor, including
  all versions of Microsoft Word, WordPad, and Microsoft Word Viewer."
    -- http://www.microsoft.com/hwdev/pc99.htm


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