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

[Freeciv-Dev] [RFC] Map decorations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [RFC] Map decorations
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 7 Oct 2001 12:07:53 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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.

Comments?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."

Attachment: map_decorations.gif
Description: GIF image


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