Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: to wrap or not to wrap?
Home

[Freeciv-Dev] Re: to wrap or not to wrap?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: to wrap or not to wrap?
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Fri, 12 Oct 2001 21:29:00 -0400

At 11:39 AM 01/10/10 -0400, Jason Dorje Short wrote:
>Raimar Falke wrote:
>wrap_map_pos(&x, &y) takes the vector (x, y) and physically wraps it
>into its proper position.  It is independent of (x, y) being real, so it
>will only work for topologies that wrap "regularly".  However, the fact
>that it'll work on any position or vector makes usage much simpler.
>
>For a real position, it will have identical effect to
>normalize_map_pos.  For an unreal position, it will wrap the coordinate
                                                     ^^^^^^^^^^^^^^^^^^^
>normally just as if it were real (which is only possible under a limited
 ^^^^^^^^  i.e. do bogus transformations of gaming coordinates.
>set of topologies).
>
>Like I said, it is confusing and will probably lead to misuse.

I don't see any real use for this. Perhaps you could give the example
(again if I missed it). I think it is more than confusing, I think it
is fundamentally wrong to think of a topology unaware 2-D wrap.

Put another way, I can see the corresponding clip_map_pos(&x,&y) being 
used in certain kinds of GUI operations that draw into a fixed window
object. This is because GUI window pixel coordinates are non-wrapped 
in both directions. But one would never wrap such coordinates in the 
same way.

Or, yet another flavour, I can see independently wrapping or clipping
individual coordinates as suboperations in certain specialized code that 
knows exactly what it is doing, but I don't see use for a generalized two 
coordinate function.

>jason

Cheers,
RossW
=====




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