[Freeciv-Dev] Re: PATCH: tile markers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Dec 15, 2001 at 11:53:25AM +0200, Teemu Kurppa wrote:
> The following patch is an initial attempt to introduce tile markers to
> Freeciv. It allows player to place markers on tiles. These can be used
> to plan city placement etc. I found them very helpful in early phase of
> the game and especially with citymindist 4 or larger.
>
> TeamCiv has similar functionality and I took the idea from there.
> However, this implementation is rather lightweight compared to Teamciv's
> implementation. Instead of a fancy red dot, just a little cross is drawn
> on a marked tile. No modifications to tilesets are needed.
>
> I implemented this only to GTK-client for non-isometric tiles.
> Tiles are marked and unmarked with '*' key, similar to TeamCiv.
>
> A Couple of notes on the implementation:
> - Tile marker locations are stored in list. For that, I introduced a new
> type "coords", which is just a coordinate pair (x,y).
common/map.h contains:
struct map_position {
int x,y;
};
> - tile markers are drawn after and outside of tile drawing iteration. It
> is better to iterate over marked tiles than to check on every tile, if
> that tile is marked
>
> - I felt a little bit uncomfortable with client code organization. It
> was hard to figure out, where to add e.g. coords list defintions.
> Anyway, I just put everything to somewhere and included appropriate
> headers. Someone with better vision of client code's structure, can
> suggest better places, if that matters.
>
> - Tile markers are not saved anywhere, so they are lost, if you get
> temporarily disconnected. This a bit inconvenient, but I'm not sure is
> it the worth of trouble to bring marker information to server.
Use attributes. (client/attribute)
> - I didn't yet implement the view tile markers -toggle, which probably
> should be there.
Yes.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Premature optimization is the root of all evil."
-- D. E. Knuth in "Structured Programming with go to Statements"
- [Freeciv-Dev] Re: PATCH: tile markers, (continued)
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/15
- [Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Per I. Mathisen, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
[Freeciv-Dev] Re: PATCH: tile markers,
Raimar Falke <=
[Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Raimar Falke, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Petr Baudis, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Raimar Falke, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Teemu Kurppa, 2001/12/16
- [Freeciv-Dev] Re: PATCH: tile markers, Raimar Falke, 2001/12/16
|
|