Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: [PATCH] Re: Short stupid question (PR#569)
Home

[Freeciv-Dev] Re: [PATCH] Re: Short stupid question (PR#569)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Re: Short stupid question (PR#569)
From: Erik Sigra <freeciv@xxxxxxx>
Date: Sun, 24 Sep 2000 13:03:00 -0700 (PDT)

Erik Sigra wrote:
> Gaute B Strokkenes wrote:
> > Erik Sigra <freeciv@xxxxxxx> writes:
> > > Gaute B Strokkenes wrote:
> > > > Erik Sigra <freeciv@xxxxxxx> writes:
> > > Thanks. I read it and it looks cleaner with your patch. I was going to
> > > compile it as well but there was an unrelated error in the way (see my
> > > previous post) that stopped me. I see no reason not to commit it if it
> > > works.
> > >
> > > #define hmap(x,y) (height_map[(y) * map.xsize + map_adjust_x(x)])
> > >                   ^                                             ^
> > > Are thoose parentheses really neccessary?
> >
> > Don't know.  I can't think of an operator with a higher priority than
> > [] that would case trouble, but I didn't bother to look it up in a
> > table.  They certainly don't hurt.
> 
> I asked that because I had looked it up at
> <http://renoir.vill.edu/~lab/C/#OPERATORS> and found that [] is in the
> highest priority class and thought that the parentheses could be left
> out.

Now I tested it and got a quite funny result. See
<ftp://ftp.freeciv.org/freeciv/incoming/hmap_fix.png>. Especially note
the mini-map. (Not that it would be uniteresting to play on such a map,
but I suggest you take a look at the code again.)




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