Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (s
Home

[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]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8632) Easy way to set map size with auto ratios (seteables if desired)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 5 May 2004 10:37:52 -0700
Reply-to: rt@xxxxxxxxxxx

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

Marcelo Burda wrote:

> +    int size_max = MAP_MAX_LINEAR_SIZE / MAX(Xratio, Yratio * iso) / 2;
> +    int size_min = MAP_MIN_LINEAR_SIZE / MIN(Xratio, Yratio * iso) / 2;
> +    if (size < size_min) { size = size_min; };
> +    if (size > size_max) { size = size_max; };
> +    /* sanity check for extreme map.ratio 
> +    (as 9:1 or 1:9 (1:18 IN ISO!) and extreme map.size as (2 or 20)*/
> +    assert(size_min <= size_max);

I'm not sure this check works.  The size restriction is in _map_ 
coordinates whereas these calculations seem to be done in native 
coordinates.

jason




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