Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#7152) tile markers
Home

[Freeciv-Dev] (PR#7152) tile markers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: caspar-freeciv@xxxxxxxxxxxx, rf13@xxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#7152) tile markers
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 22 Aug 2004 23:30:31 -0700
Reply-to: rt@xxxxxxxxxxx

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

Tile markers are a good idea.  However this patch is woefully out of
date and doesn't do this in a good way.

- Tile markers may consist of some type of decoration (in Teamciv, an X
mark) or maybe text (like in SMAC).

- They should be persistent.  The information should be sent to the
server and stored in the savegame.  It should NOT be a client attribute
but should be a real part of the savegame.

- It follows that goto should not use this interface.  Goto should just
use goto.  It is not persistent.

- It should be done for all clients, or at least without breaking all
clients.

- Markers should be player-specific but shared betweeen teammates.

- Only one marker per tile should be possible.  If there are different
types of markers (text label versus icon) maybe one of each type is
possible.

I propose several new functions, for starters:

  bool get_mapview_mouse_pos(int *canvas_x, int *canvas_y);
  bool get_overview_mouse_pos(int *canvas_x, int *canvas_y);

which will be useful in other places as well (these are obviously GUI
functions).  When toggling a simple marker (as in the original patch,
just by hovering the mouse and pressing a key) the common client code
can determine the tile and send a packet to the server to register the
marker.  A mapview update is done either immediately or when the server
sends a response, and the marker is drawn.

  void key_mark_tile_icon(enum color_std color);

For text things are a little more complicated: a dialog is needed.  In
this case the GUI should popup the (non-modal) dialog _before_ calling
any common client function.  The results are similar except that the
mapview update is a little more complicated.

  void key_mark_tile_text(const char *label);

Some of these ideas may conflict with "map decorations" patch.  I looked
at this patch but couldn't make much sense out of it.  Code like
  +    current->internal.m = 2.0;
  +    current->internal.n = 2.0;
  +    current->internal.s = 0.0;
  +    current->internal.t = 0.0;
just isn't meant to be read.  Raimar, please comment.

-jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7152) tile markers, Jason Short <=