Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: directional system: more magic code cleanups
Home

[Freeciv-Dev] Re: directional system: more magic code cleanups

[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@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: directional system: more magic code cleanups
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Sep 2001 09:12:23 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Sep 24, 2001 at 01:19:14AM -0400, Ross W. Wetmore wrote:
> I notice you left the two normalize_map_pos() operations in for the
> Ross code, but neglected to add them for the others. This will change
> the profiling results somewhat, as function calls will probably
> dominate the time, and even the extra double compare in a macro
> is probably significant here.
> 
> Since these are there really to handle the truly oddball cases where
> the src and destination are separated by more than a full map in the
> wrapped case, and none of the others are checking for this it is
> redundant.
> 
> The code appears to have been reformatted as well since I generally
> lineup the things like if clauses in ways that enhance similarities
> rather than obscure them. I don't believe the multi-line if's are 
> broken in quite the way that the sample code was in when sent to you.
> So I take some offense at your "readability" comments.

Yes I reformatted the code. Yes I changed two things: MAP_WRAP_[XY] in
your code and one error in my code. I haven't made any change to
normalize_map_pos calls.

> I suspect, that your "bugs" are really just the fact that the scalar
> product cases don't prefer the diagonal move when diagonal or cartesian
> are equivalent.

Ross it doesn't work this way. I tested the code and showed that the
result of your method is different than 3 others. I expected from you
that you take a look and either prove that your method is right and
the other three are buggy and tell why this is so OR you post a fixed
version of your code OR you show that there are really different
results possible. BUT NOT a "I suspect".

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Sit, disk, sit. Good boy. Now spin up. Very good. Here's a netscape
  cookie for you. Fetch me some data. Come on, you can do it. No, not that
  data. Bad disk. Bad." 
    -- Calle Dybedahl, alt.sysadmin.recovery


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