Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming

[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Sat, 01 Sep 2001 05:41:06 +0200

On Thu, 30 Aug 2001, gs234@xxxxxxxxx wrote:

> When I get back from work I intend to change is_real_tile()
> IS_VALID_POS(), on the grounds that it tests a coordinate pair
> rather than a tile pointer, and because a position if valid iff it
> refers to a tile on the map.  I will change normalize_map_pos() to
> always adjust the x coordinate, and then I will add a IS_SANE_POS()
> to test whether a position refers to a tile on the map and is in
> canonical form.

And here it is.

In addition to the above, this patch converts a lot of manual loops to
use iteration macros and fixes the odd bug here and there.  It also
adds a function nearest_real_tile() which is the functional equivalent
of map_adjust_x() and map_adjust_y() when applied to a position.
There is another macro, MAPSTEP(), which makes a single step in a
given direction and then normalizes the result.

I've also taken out the access changes to the map_[gs]et_* functions;
while I think that they are desirable in general I do not think the
codebase in general is quite ready for them yet.

I plan to apply this after I've given it some testing; there should be
little here to offend anyone.

Note that the patch doesn't show is_real_tile -> IS_VALID_POS, since
this would only clutter the patch.

Attachment: cc.diff
Description: Text document

Big Gaute                     
I will establish the first SHOPPING MALL in NUTLEY, New Jersey...

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