[Freeciv-Dev] (PR#6669) Poles on a N-S wrapping topology
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6669 >
this is my proposal for make_poles, i am tested it in new topologies but
i not undestand exactly the makepoles==1 rules. probably i no want it.
i am debuged the map_clima funcion get my Full quincuncial patch (6721)
for test it.
it handle all topologies
static void make_polar(void)
{
int map_x,map_y,T,polar;
struct tile *ptile;
whole_map_iterate(map_x, map_y) {
T=map_clima(map_x, map_y); /* temperature parameter */
ptile = map_get_tile(map_x,map_y);
if(T <= 10 ) /* get the 10% coolest part of the map */
{
if(!is_ocean(ptile->terrain))
{
if(T < (5+myrand(5))) /* 5% arctic + 5% arctic and tundra */
ptile->terrain = T_ARCTIC;
else
ptile->terrain = T_TUNDRA;
}
else if(T < (5+myrand(5))) /* 5% arctic + 5% arctic and ocean */
ptile->terrain = T_ARCTIC;
} else if (T <= 30)
if(ptile->terrain == T_JUNGLE)
ptile->terrain = T_FOREST;
if(map.separatepoles==0) return;
/* handing spetial rules for borders */
/* we realy need it? [mburda]*/
if(XWRAP_TYPE(WT_SIMPLEST) && YWRAP_TYPE(WT_NONE))
{
polar = (get_maptype(MAP_TYPE_ISO) ? 3 : 1);
/* etc */
}
} whole_map_iterate_end;
}
Marcelo
|
|