[Freeciv-Dev] Re: [PATCH] get_map_area() (PR#1050)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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 , 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.
 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.