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: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Aug 2001 09:50:18 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Aug 16, 2001 at 01:58:26AM -0400, Jason Dorje Short wrote:
> Trent Piepho wrote:
> > 
> > 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 don't think making normal no longer a subset of real makes much 
> > sense.
> 
> I agree entirely with Trent on this one:
> 
> 1.  The only reason to make these functions macros is speed.  Speed is a
> small concern compared to the possibility of having multiple topologies.
> 
> 2.  I think we have some confusion over the meaning of "normal".  I
> don't see how the coordinates (2, -1) could possibly be normal.  I don't
> understand the difference you claim between "normal" and "proper"
> coordinates.  If you're saying they're "normal" because they can't be
> wrapped to anything, then...it's a nomenclature problem.  We should
> agree on a name (normal or proper, whatever), and use that.  I don't see
> how the macro IS_NORM_TILE you describe would ever be useful.
> 
> Note that my definition of is_normal_tile corresponds very closely to
> normalize_map_pos.  Using normal to mean something else would be _very_
> confusing IMO.

I have to second Jason here. Please Gaute give us with definitions.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I was dead ... but I'm better now."
    -- Capitain Sheridan in Babylon 5


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