Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: (PR#4004) A canvas_iterate macro for mapview
Home

[Freeciv-Dev] Re: (PR#4004) A canvas_iterate macro for mapview

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#4004) A canvas_iterate macro for mapview
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 Apr 2003 20:21:48 -0700
Reply-to: rt@xxxxxxxxxxxxxx

rwetmore@xxxxxxxxxxxx wrote:
> I think that the following shows what should not be in the basic loop
> macro, rather than what should be. The problem is one of separation of
> functionality, and not trying to overload something with every special
> case possibility. GB actually has the right idea below.

> Thus, if one rephrases the problem in a suitable way, one just has
> to do a simple GB iteration over the border+viewable tiles in the
> window asking them to draw themselves possibly with some context
> mask that tells an individual tile-draw which adjacent positions
> might be relevant.

You're right that the iteration should not know anything about the 
different parts of the tiles - this should be left up to the user.  But 
this doesn't change my implementation at all, since it doesn't do any of 
this anyway.

> The iteration is realtively straightforward and can probably be done
> in a single way for both the isometric and standard cases using some
> sort of gui_native coordinates.

This is what my current implementation does - but it is not pretty. 
Clarifying the concepts involved (specicially, defining "GUI 
coordinates" and/or "native GUI coordinates") may help.  But something 
that required less code would also be good.

jason




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