[Freeciv-Dev] Re: Core code cleanups [Was: Profiling Civserveragain]
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 2 Aug 2001, Jason Dorje Short wrote:
>
> I now realize that in this case I meant unreal (or non-real, invalid)
> coordinates.
Oh, I see what you mean. I think you can create an alternate version of the
macro that handles this. With my system of wrapping, it would look like this:
/* Iterate over ALL adjacent tiles. valid will be false if current tile does
not exist. x1 and y1 will be meaningless in that case, but dir will be
correct. */
#define adjc_dir_all_iterate(x, y, x1, y1, dir, valid) \
{ int type = map_get_boundary_type(x,y); \
for(dir=0;dir<8;dir++) { \
valid = (DIR_DX[type][dir]!=MAX_INT); \
x1 = x + DIR_DX[type][dir]; \
y1 = y + DIR_DY[type][dir]; \
[Freeciv-Dev] Re: Core code cleanups, Ross W. Wetmore, 2001/08/01
Message not available[Freeciv-Dev] Re: Isometric maps, Lino Mastrodomenico, 2001/08/04
|
|