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 05:41:37 -0700 (PDT)

Gaute B Strokkenes wrote:
> 
> Erik Sigra <freeciv@xxxxxxx> writes:
> 
> > In server/mapgen.c:
> 
> > Is the use of "*hmap(x, y)" equivalent to the use of "full_map(x, y)"?
> 
> That's not at all a stupid question.  Answer: Yes (bet you're really
> surprised now, eh? 8-) except that full_map() doesn't check if it
> should normalise the x-coordinate, which I think is probably a bug
> since there are lots of calls along the lines of full_map(x-1, y)
> (well, not directly, but indirectly through e.g. make_dessert() etc.)
> 
> Here's a patch to clean up the mess:

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?




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