[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]
<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.
jason
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles.,
Jason Short <=
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/07
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/07
- [Freeciv-Dev] (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/12
- [Freeciv-Dev] (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/12
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/22
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/22
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/22
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Marcelo Burda, 2004/05/23
- [Freeciv-Dev] Re: (PR#8624) New clima function to best handle terrain place, used to place poles., Jason Short, 2004/05/23
|
|