Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Core code cleanups [Was: Profiling Civserveragain]
Home

[Freeciv-Dev] Re: Core code cleanups [Was: Profiling Civserveragain]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Core code cleanups [Was: Profiling Civserveragain]
From: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Date: Thu, 02 Aug 2001 01:11:37 -0400

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


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