[Freeciv-Dev] Re: Core code cleanups [Was: Profiling Civserveragain]
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Trent Piepho wrote:
>
> On Wed, 1 Aug 2001, Jason Dorje Short wrote:
> > 2. There are some loops that have alternate code for non-normal cases,
> > which won't work under the macro. These were inevitably one-liners, and
> > could be solved by pre-setting the values using memcpy, memset, or a
> > simple for loop.
>
> I'm not sure I understand what you mean. Non-normal?
"Normal" refers to the canonical map coordinates, the ones that are
actually usable (within [0..map.xsize-1,0..map.ysize-1]). This is a
different concept from "real" coordinates that can be normalized on
demand (by being wrapped). Non-normal coordinates, therefore, are any
coordinates not on the main map.
I now realize that in this case I meant unreal (or non-real, invalid)
coordinates.
Each tile has at least one array of data based on direction: a data[8]
array that contains one datum per direction. When it's initialized, the
code wishes to initialize this array even for directions that have no
significance - the ones that point off the map to unreal coordinates.
The normal operation of the adjc_dir_iterate macro does not include
these directions in the loop.
jason
[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
|
|