Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7384) Vertical scroll zigzag in iso mode.
Home

[Freeciv-Dev] Re: (PR#7384) Vertical scroll zigzag in iso mode.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7384) Vertical scroll zigzag in iso mode.
From: "rwetmore@xxxxxxxxxxxx" <rwetmore@xxxxxxxxxxxx>
Date: Sat, 7 Feb 2004 15:21:01 -0800
Reply-to: rt@xxxxxxxxxxx

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


Note, that in a natural display isometric has even and odd rows with
one inset by half a tile. The x coordinate steps by two, and the
corresponding scrolling in the y coordinate should also step by two.

Compressed iso or native-iso divides row coordinates by 2 to use a
more compact memory storage arrangement. But it is a mistake to treat
the scrolling in native-iso symmetrically in compressed-x and y, i.e.
not handling the extra factor in the y direction.

Thus the following patch is essentially the right idea and may be
almost enough.


But it may not be complete. I think that one should be able to click on
any tile and have it become the centre tile, or be on the centre line
if the GUI window is constrained by edge overlap. There may need to be
a fix to the map_view centring logic to deal with any odd coordinate
truncations.

Once one accounts for scrolling by 2 in even or odd y coordinates, and
coordinates with setting the map_view offsets, then one can reach any
allowed tile subject to the constraints on how far off the map one can
go in mixed display where one uses iso view with a standard map or vice
versa.

The corecleanups got this right using EXTRA_BOTTOM_ROW to build a slightly
oversized backing store, with logic in centering the map_view (called in
scrolling and click updates) keeping things even or odd y aligned, and
thus had none of these problems.


A longer term solution along the lines of the corecleanups would use
the same oversized backing store and paint the current scrolled view
in *pixel* offsets to the screen with a quantum jump of the backing
store only when one crossed a tile boundary. Another solution along the
same lines is the 3x3 trick or building wrapping into the backing store
to screen copy step.

The key point is to build the backing store efficiently in tile granular
chunks, and copy the appropriate parts to the GUI window in any level
of scrolling resolution one desires. Splitting the two operations keeps
things quite simple.

Cheers,
RossW
=====

Gregory Berkolaiko wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7384 >
> 
> Set topo to >= 4.
> tiles to isotrident (I guess this is irrelevant).
> 
> Scroll vertically, using either the bar or the arrow buttons.  View 
> zigzags unpleasantly.
> 
> A hack which sets the scroll step to 2 and cures zigzaging is attached.  
> It's is not good, but probably a step in the right direction.
> 
> G.




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