Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: Remove map_adjust_[xy] invocations fromserver (PR#10
Home

[Freeciv-Dev] Re: Remove map_adjust_[xy] invocations fromserver (PR#10

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Remove map_adjust_[xy] invocations fromserver (PR#1003)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Oct 2001 08:34:22 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Oct 15, 2001 at 12:22:23AM -0400, Ross W. Wetmore wrote:
> At 12:53 AM 01/10/13 -0400, Jason Dorje Short wrote:
> >"Ross W. Wetmore" wrote:
> >> At 05:18 AM 01/10/12 -0400, Jason Dorje Short wrote:
> >> >Raimar Falke wrote:
> >> >[snip: uses of is_real_tile, normalize_map_pos, etc.]
> >> >
> >> >> I plan to propose something like this:
> >> >>  - there is a CHECK_MAP_POS(x,y) == assert(is_normal_map_pos(x,y));
> >> >>  - every "assert(is_real_tile(x,y));normalize_map_pos(x,y)" is
> >> >>  replaced by CHECK_MAP_POS
> >> >>  - there is an extra check (if(!is_normal_map_pos(x,y)){y=x/0;})
> >> >>  introduced in map_inx
> >> 
> >> As far as I am aware, is_normal_map_pos() is not the same thing as
> >> is_real_tile(). It tests for normalized and not realness which are
> >> different concepts that you really need to keep straight.
> >
> >Correct.  What Raimar is proposing is not a substitution of a macro for
> >identical code, but rather "fixing" the code to always pass normal
> >coordinates.
> 
> The code really isn't ready for this. You haven't yet added all the fixes
> for the case of guaranteed realness, let alone normalized.

The code is ready. This is the result of various patches.

> And there may be perfectly valid reasons for passing around (real but) 
> unnormalized coordinates and doing the normalization as the last step
> and not the first. 

> Gaute's examples of the "obvious way to do things" and the results
> should serve as warnings to all here :-).

No you have lost me. Can you give a hint which email you refer to?

> In the meantime, you are probably just going to break a lot of things
> unless you do it carefully one step at a time.

We want to break them ;) It is ok if the private tree got broken and a
cleanup fix is sent to freeciv-dev. This has been done in the past. We
are now ready to make the final step. Jason hasn't posted the
CHECK_MAP_POS patch yet. But if the patch got posted I urge everybody
to test it.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "#!/usr/bin/perl -w
  if ( `date +%w` != 1 ) {
    die "This script only works on Mondays." ;
  }"
    -- from chkars.pl by Cornelius Krasel in de.comp.os.linux.misc


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