Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: update for isometric scrolling problem (PR#1222)
Home

[Freeciv-Dev] Re: update for isometric scrolling problem (PR#1222)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: update for isometric scrolling problem (PR#1222)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sat, 19 Jan 2002 21:25:13 -0500

At 12:45 PM 02/01/19 -0800, Vasco Alexandre Da Silva Costa wrote:
>The scrolling code was always crap, it goes back to the time when we only
>had the Xaw client. The reliance on the number of tiles visible on a
>canvas that seldom is an exact multiple of the tile size breaks it often.
>We should rely on the size of the map in pixels in many places instead of
>doing things relating to tiles.
>
>I never took the work to make it work properly, but since you people are
>going to great lengths to clean this up, i believe it is nice if you do it
>The Right Way(TM).
>
>---
>Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa

Most of the GUI code handling is done in canvas/pixel coordinates. There 
really isn't a map_to_GUItile_pos() function anywhere, at least not until 
the recent map_to_iso_pos(), it is just map_to_canvas_pos()/get_canvas_xy().

But at the same time, the granularity of the GUI view is really tile
based through NORMAL_TILE_WIDTH/NORMAL_TILE_HEIGHT (or some /2 or /4 factor 
of these if one needs to be picky).

For example, (currently) the topleft window corner is always at a tile 
origin point (+/- pickiness), and (mapview_x0, mapview_y0) are tile
granular. The overview is also fundamentally tile granular.

When you get into mismatches between the view and the native map, then
rotated rectangular windows don't fit nicely into the corners of an 
unrotated rectangular map. Thus there has to be some spill over that
needs to show black tiles where the view extends outside the map.

In any event a lot of the drawing is tile based and one wants to know
how many extra tiles out one needs to go to make sure that all the
edge effects, i.e. tile overlaps, are properly accounted for.

Thus there seems to be a real need to deal with some level of granularity 
above pixel.

So ...

Are you suggesting the entire GUI needs to deal with things exclusively
on a pixel basis, for example, topleft needs to have pixel granularity,
or what specifically is the (TM) feature that you are looking for here?

Cheers,
RossW
=====

[ No promises until what you are suggesting is clarified, but somethings
  along this line would not be that difficult to do :-]




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