Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2002:
[Freeciv-Dev] Re: normalize_map_pos and invalid map positions
Home

[Freeciv-Dev] Re: normalize_map_pos and invalid map positions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "Per I. Mathisen" <per@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: normalize_map_pos and invalid map positions
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 9 Aug 2002 21:48:12 +0200

On Fri, Aug 09, 2002 at 01:25:20PM -0500, Mike Kaufman wrote:
> On Fri, Aug 09, 2002 at 06:04:36PM +0000, Per I. Mathisen wrote:
> > Ok, this is probably a stupid question, but anyway.
> > 
> > I take it the point of normalize_map_pos is to ensure the given map
> > positions don't point to an illegal point on the map that would case an
> > error.
> > 
> > However, sometimes, as with goto_dest_?, I believe the correct thing to do
> > is to make the positions illegal, so that they don't get used and if they
> > get used, an error is generated so that the problem can be fixed.
> > 
> > So what would be an illegal map position? (-1, -1)?
> 
> urk, -1,-1 is (will be) a valid position. (at least that's my
> understanding of the whole thing...)
> The solution should be to add an illegal position bit?

Please be more precise what you mean with illegal and valid.

If you require that only normal positions are used (Ross may disagree
on that point) on the network (this is enforced now) and on the other
uses (function arguments, ...) than you can guaranty that (-1, -1)
isn't a normal position and can so spotted nicely.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 A life? Cool! Where can I download one?


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