Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] MAPSTEP
Home

[Freeciv-Dev] Re: [Patch] MAPSTEP

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] MAPSTEP
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 22 Sep 2001 22:52:18 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, Sep 22, 2001 at 02:41:17PM +0200, Raimar Falke wrote:
> On Sat, Sep 22, 2001 at 01:13:05PM +0100, Gregory Berkolaiko wrote:
> >  --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> > > 
> > > The patch removes all occurrences of DIR_DX by:
> > >  - replacing loops with adjc_[dir_]iterate or
> > >  - useing the new macro MAPSTEP or _MAPSTEP
> > 
> > This patch is very badly needed and long waited for.  I cannot detect any
> > mistakes, but I did not read it thouroughly or/and carefully.
> > 
> > However I strongly object to your use of _MAPSTEP because:
> > 1. It obscures the code.
> > 2. It is unnecessary.
> > 3. It's got bad name (MAPSTEP_FROM_0 would be better if you insist on
> > using it).
> 
> I introduced it for the case you mentioned below. You may have a way
> to express this without an extra macro besides MAPSTEP.
> 
> > > I'm sure I have made mistakes. Can you please go over the patch? I
> > 
> > how about test runs and comparisons between old/new savegames ?
> 
> This is the next step.

I found one error. Unfortunately you can't compare them because the
old/current code is buggy. It uses unreal positions. Try the attached
patch and watch.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "When C++ is your hammer, everything looks like a thumb."
    -- Steven M. Haflich

Attachment: dir_dx_remove3.diff
Description: Text document

Attachment: extra_assert.diff
Description: Text document


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