[Freeciv-Dev] Re: (PR#3936) introducing native coordinates
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
On Thu, Apr 24, 2003 at 08:58:16AM -0500, Jason Dorje Short wrote:
- how can mapview code done in an easier way (IMHO with an
intermediate form)
Again you are lumping a whole collection of unrelated operations into
one term.
This is a bit terse.
I'm trying to split unnormalize_map_pos into two operations. First the
wrapping and than the rotating and scaling to pixels. What is your
opinion?
unnormalize_map_pos is only a small part of the mapview code - just a
single part of one function (map_to_canvas_pos). It does the wrapping
part only; the rotating and scaling to pixels is done separately by
map_to_canvas_pos. So this split is already in place...
If it only does the wrapping it is complex. I have to look further
into this.
If you're willing to sacrifice correctness you can write something
simpler by determining the map_distance_vector from the center tile of
the mapview_canvas. However it will end up putting some tiles
off-canvas when they could rightfully be wrapped directly onto the canvas.
Something truly simple could be written with basic wrapping, ignoring
the iso nature of the mapview. This is what the current code does, but
it has a signficant bug: even if you make the canvas infinitely large
some tiles will never be shown.
For full correctness, unnormalize_map_pos should take a width and height
parameter. This also potentially allows multiple drawing of tiles.
However, this makes it even more complicated and only helps in a few
pathological cases.
jason
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, (continued)
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/16
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/17
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/23
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Jason Dorje Short, 2003/04/23
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Jason Dorje Short, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Jason Dorje Short, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/26
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates,
Jason Dorje Short <=
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/26
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/26
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Raimar Falke, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Jason Dorje Short, 2003/04/24
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/26
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/27
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/27
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/27
- [Freeciv-Dev] Re: (PR#3936) introducing native coordinates, Ross Wetmore, 2003/04/16
|
|