Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 16 Aug 2001 14:49:26 +0100 (BST)

 --- Gaute B Strokkenes <gs234@xxxxxxxxx> wrote: 
> 
> Attached is patch that fixes several instances where Freeciv
> inadvertently creates unnormalised map coordinates or makes use of
> unreal map coordinates.  It also changes the is_real_tile() function
> to a macro IS_REAL_TILE(), and adds macros IS_NORM_TILE() and
> IS_PROP_TILE(), and some other coordinate related things.
> 

I don't like this patch very much.  Apart from confusion with the names
REAL, NORM and PROP, it seems to me that MAP duplicates map_get_tile and
the checks are not getting less scattered around.

I also think you should try to avoid using 

x=map_adjust_x(x)
if (!IS_REAL_TILE(x,y)){ ... }

in favour of normalise_map_pos.  The reason is that it's much easier to
adapt normalise_map_pos to different topologies, also those where
adjusting x will depend on y (one of them being proper civ2-style
isometric view).

> Unless anyone objects, I will apply this soon after adding some
> explanatory comments to the new macros.  It would be nice if someone
> could verify that the GTK and MUI clients do not go bananas with this
> patch, since I can't test them myself.

I will try to try it on GTK ;)

G.


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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