[Freeciv-Dev] (PR#9818) Inland lakes and borders
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9818 >
> [mstefek - Sam. Aoû. 28 11:30:13 2004]:
>
> I synchronized my patch with Marcelo's work
>
> Besides claiming inland lakes it also:
> - counts oceans and continent sizes during assign_continent_numbers
> - provides functions:
> - int get_continent_size(Continent_id id)
> - int get_ocean_size(Continent_id id)
>
> calculate_inland_lakes is renamed recalculate_lake_surrounders. It is
> much better name.
> --
> mateusz
>
whole_map_iterate(x, y) {
+ Continent_id cont = map_get_continent(x, y);
+ if (cont > 0) {
+ /* land */
you assume land has continent name positive, this shuld ne avoide must
use is_ocean(get_terrains(x,y))
+ adjc_iterate(x, y, x2, y2) {
+ Continent_id cont2 = map_get_continent(x2, y2);
+ if (cont2 < 0) {
+ if (lake_surrounders[-cont2] == 0) {
+ lake_surrounders[-cont2] = cont;
+ } else if (lake_surrounders[-cont2] != cont) {
+ lake_surrounders[-cont2] = -1;
+ }
+ }
+ } adjc_iterate_end;
+ }
+ } whole_map_iterate_end;
Marcelo.
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/26
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Marcelo Burda, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Marcelo Burda, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders,
Marcelo Burda <=
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/28
- [Freeciv-Dev] (PR#9818) Inland lakes and borders, Mateusz Stefek, 2004/08/30
|
|