[Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (s
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8632 >
Marcelo Burda wrote:
> Yes, yes, as you see i not make exactly it, i see!!.
> some place this is not a good idea, in the def of a global array, that
> is simply not posible.
> not worry.
> but still one place where i not understan why there is a for over the
> number of tiles of the map. probably i litle numer is ok
> --- freeciv/server/citytools.c 2004-05-28 11:35:27.000000000 +0200
> +++ freeciv_/server/citytools.c 2004-05-29 02:12:42.000000000 +0200
> @@ -280,7 +280,7 @@
> Nation_Type_id nation_list[game.nation_count], n;
> int queue_size;
>
> - static const int num_tiles = MAP_MAX_WIDTH * MAP_MAX_HEIGHT;
> + const int num_tiles = NATIVE_WIDTH * NATIVE_HEIGHT;
>
> /* tempname must be static because it's returned below. */
> static char tempname[MAX_LEN_NAME];
> @@ -371,7 +371,7 @@
> }
> }
>
> - for (i = 1; i <= num_tiles; i++ ) {
> + for (i = 1; i <= num_tiles; i++ ) { /* why num_tiles ?? [mburda] */
> my_snprintf(tempname, MAX_LEN_NAME, _("City no. %d"), i);
> if (!game_find_city_by_name(tempname)) {
> return tempname;
> diff -ruN -Xfreeciv/diff_ignore freeciv/server/mapgen.c
> freeciv_/server/mapgen.c
It's just an arbitrary bound. It's exceptionally unlikely that the
"City no. %d" case will even be reached. But if it is we don't want to
run out of possible city names since that's basically a fatal error.
This bound doesn't hurt anything and should stay. Although it would be
fine as a INDEX_WIDTH (NATIVE_WIDTH * NATIVE_HEIGHT) as well.
jason
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Jason Short, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Jason Short, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/28
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Jason Short, 2004/05/29
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/29
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired),
Jason Short <=
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), rwetmore@xxxxxxxxxxxx, 2004/05/31
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/31
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Marcelo Burda, 2004/05/31
- [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired), Jason Short, 2004/05/31
|
|