Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH] get_map_area() (PR#1050)

[Freeciv-Dev] Re: [PATCH] get_map_area() (PR#1050)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] get_map_area() (PR#1050)
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Thu, 01 Nov 2001 14:52:57 -0500
Reply-to: jdorje@xxxxxxxxxxxx

Raimar Falke wrote:
> On Thu, Nov 01, 2001 at 08:35:15AM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > The attached patch provides a new topology function, get_map_area(),
> > that returns the total area of the active map (equal to the size of the
> > normal set).
> >
> > Later this can be optimized away; when the topology is initialized
> > map.area can be set up along with map.xsize and map.ysize.  For now,
> > this is a necessary step toward maps where normal!=regular.
> >
> > This patch is tiny, and shouldn't be controversial.  The uses of the
> > function in mapgen() aren't strictly necessary, but for the most part
> > make the code more readable.  Some could be left out if necessary.
> "area" indicates (at least for me) that this is measured in km^2 or
> something similar. What about map_num_real_tiles or similar?

Well, it is being measured in units^2, where a "unit" is the diameter of
a tile. :-)

It could be called map_num_tiles [1], but IMO map_area (or get_map_area)
is more readable.  But if you're set against it, it doesn't matter too
much to me.

[1] map_num_real_tiles is inaccurate, but map_num_normal_tiles would
work.  But only normal positions have tiles associated with them anyway,
so it might as well just be map_num_tiles.


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