Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8627) best overview for iso-maps
Home

[Freeciv-Dev] Re: (PR#8627) best overview for iso-maps

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 May 2004 19:41:23 -0700
Reply-to: rt@xxxxxxxxxxx

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

Why do you turn OVERVIEW_TILE_WIDTH and OVERVIEW_TILE_HEIGHT into 
constant values?  You shouldn't do this.  They should be adjusted based 
on the height of the map.

I suggest something like:

climap.h:

   /* Number of tile units in a covering natural tile. */
   #define NATURAL_TILE_WIDTH (topo_has_flag(TF_ISO) ? 2 : 1)
   #define NATURAL_TILE_HEIGHT 1

tilespec.h:

   int overview_tile_width, overview_tile_height;
   #define OVERVIEW_TILE_WIDTH (overview_tile_width * NATURAL_TILE_WIDTH)
   #define OVERVIEW_TILE_HEIGHT (overview_tile_height * \
                                 NATURAL_TILE_HEIGHT);

packhand.c (or mapview_common.c):

   overview_tile_width = 120 / NATURAL_WIDTH;
   overview_tile_height = OVERVIEW_TILE_WIDTH;

There are other ways to do it.  But:

1.  The overview tile size should be scaled to keep the overview width 
around 120.

2.  The TF_ISO check should only be done in one place when calculating 
overview tile width.

jason




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