[Freeciv-Dev] Re: (PR#6170) Alternative city square utilizations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
One of the simplest ways to handle arbitrary city shapes is to update the
citymap macros to accept an arbitrary list of indexed city tile offsets,
or a masking function on a given list. This will cover 90% of accesses.
This will also move to a system that Renier has been looking for for a
long time in which functional distance relationships are *not* the basis
for adjacency rules.
But as Jason points out, there are a number of places where an exact
distance computation (for GUI layout), or validity check like
is_real_citymap_pos() are done, that may be expensive to generalize, i.e.
waking the linear list should be considered a non-starter.
The first step should be to go over the code and identify all such changes
then writeup an RFC that suggests how the common and less common elements
might be coded.
One can also add the arguments in favour of doing this, or against, and
then send it on to a review board for priority and validity assessment.
Cheers,
RossW
=====
Jason Short wrote:
> John Wheeler wrote:
>
>
>>This whole idea probably will work best when gen-topology is implemented.
>
>
> I don't think gen-topology has anything to do with this. If you want to
> work on it, you might as well start now. I'd suggest you start by
> getting things to work if CITY_MAP_SIZE is changed.
>
> For the client, see get_citydlg_canvas_width, get_citydlg_canvas_height,
> city_to_map_pos, and map_to_city_pos. There are some magic numbers in
> there that will have to be generalized. For iso-view, it may not be
> obvious how to do this.
>
> jason
|
|