Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4648) how to do wrapping in map_to_canvas_pos?
Home

[Freeciv-Dev] Re: (PR#4648) how to do wrapping in map_to_canvas_pos?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#4648) how to do wrapping in map_to_canvas_pos?
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jul 2003 06:25:01 -0700
Reply-to: rt@xxxxxxxxxxxxxx

rwetmore@xxxxxxxxxxxx wrote:
> You understand what the is_isometric parameter does. You just need to
> understand why you need to do this in the general case. You see the
> problems when you don't, but haven't quite put all the pieces in the
> proper perspective yet it seems.

The is_iso parameter is needed in the original design to avoid having 
some tiles always be drawn out-of-sight on the mapview (no matter how 
large the window becomes).  This is why I originally insisted that you 
add the parameter.  Unnormalize_map_pos is a mathematically elegant 
solution to this problem.

But if you base your calculations off of the center tile this problem 
becomes moot.  In fact it fixes another problem as well: in iso view 
with unnormalize_map_pos the top and left row of tiles will always be 
drawn halfway out of sight, no matter how large the mapview window 
becomes.  By using the center tile as origin we guarantee that the set 
of positions we draw is always centered on the mapview.

jason




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