Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain pl
Home

[Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain pl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles.
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Fri, 7 May 2004 11:51:22 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8624 >

Le ven 07/05/2004 à 20:28, Jason Short a écrit :
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8624 >
> 
> Marcelo Burda wrote:
> 
> > the probem is to known the number to counted in a no-singular position
> > and compare it  the option i am thinking in.:
> 
> Ugly but workable.
> 
> It's also possible to make the check directly using topology code.  In 
> addition to IS_BORDER_MAP_POS(x, y, dist) we would have 
> IS_SINGULAR_MAP_POS(x, y, dist).  The second function would be similar 
> to the first but with some additional wrapping checks.
> 
> bool is_singular_map_pos(int x, int y, int dist)
> {
>    if (!topo_has_flag(TF_ISO)) {
>      if (!topo_has_flag(TF_WRAPX)
>          && x < dist || x >= map.xsize - dist) {
>        return TRUE;
>      }
> 
>      if (!topo_has_flag(TF_WRAPY)
>          && y < dist || y >= map.ysize - dist) {
>        return TRUE;
>      }
> 
>      return FALSE;
>    }
> 
> }
> 
> of course this will only work with the real_map_distance.  And it may be 
> harder to get it to work with hex tiles.  This function needs to be more 
> accurate than is_border_map_pos since that function just says if the 
> position _may_ be a border position.  is_singular_map_pos must be 100% 
> accurate.
> 
that is exactly i not want. this only find simplest singularities but
not the central simetries in quincuntial. if iterator is well defined
(as is in quincuntial patch!) this near_singularities find it!
but evidently is_singular_map_pos is realy best in any other topologies.
> jason
-- 
 . /  .     '    ,    .      (*)   '        `     '      `    .    
  |    ,  |   `     ,     .      ,   '  Marcelo Julián Burda      .
 /  '     \     `     \@_     '      .        '      `        '    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




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