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: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 19:12:31 -0700 (PDT)

On Thu, 16 Aug 2001, Gaute B Strokkenes 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.

If you ever want to support topologies other than a cylinder, you probably
don't want to make these a macro.  IS_NORM_TILE would become quite a mess of
?: operators just to support the three most simple map types of plane,
cylinder, and sphere, not even considering the crazy shit like Mobius strips
some people were talking about.

Also, most of the places these functions are used is inside debugging assert
calls.  There is no point in making those faster since they are just for
debugging.  So there is no good reason to make it a macro in the first place.

I also wonder if making city_map_iterate use normalized map coordinates, or
creating another version that does, might be a good idea.  Is there much
(any?) code that wants to iterate over non-normalized coordinates in the city
map?

I also don't think making normal no longer a subset of real makes much sense.



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