Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: (PR#3936) introducing native coordinates
Home

[Freeciv-Dev] Re: (PR#3936) introducing native coordinates

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3936) introducing native coordinates
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 12 Apr 2003 08:24:06 +0200

On Fri, Apr 11, 2003 at 05:20:29PM -0500, Jason Dorje Short wrote:
> Raimar Falke wrote:
> >On Fri, Apr 11, 2003 at 04:11:14AM -0500, Jason Dorje Short wrote:
> 
> >>This makes some sense.  But please try to distinguish which map you are 
> >>representing, and which coordinate system you are using.  For instance is 
> >>a
> >
> >
> >    THERE IS ONLY ONE COORDINATE SYSTEM. EACH TILE HAS EXACTLY ONE
> >    PAIR (x,y).
> >
> >This is different to your idea but I think it makes it easier to
> >understand. At least for me.
> 
> Ahh, well that explains part of the confusion [1].  The problem is, it 
> doesn't work.  Your proposal is that we only use native coordinates, 

> but square_iterate and other local functions cannot be implemented
> in these coordinates

Why not? In the worst case I calculate all the vectors by
hand and hardcode them. Something like:

#define square_dxy_iterate(center_x, center_y, radius, x_itr, y_itr,          \
                           dx_itr, dy_itr)                                    \
{  
  if(radius>=1) {
    go over (x, y-2) (x, y-1) (x+1, y) (x-1, y-1) (x, y+1) (x-1, y) (x-1, y+1) 
(x, y+2)
  }
  if(radius>=2)
  {
    go over ....
  }
  if(radius>=3)
  {
    go over ....
  }
  ...
}

> Similarly, global operations cannot be done in map coordinates.

My coordinates are perfectly for global operations. global
operations==whole_map, savegame? What else?

While I understand that you require me to provide an implementation I
currently have no time for this. Maybe next week. However if you think
that a certain thing isn't possible with my idea I would like to think
about it. If there is a problem which can't be solved than I have no
problem accepting your more complex solution. I haven't thought about
wrapping in detail but I think it is easy. The same is true for the
distance functions. So what are the functions which can't be done with
my idea?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "At the beginning of the week, we sealed ten BSD programmers
  into a computer room with a single distribution of BSD Unix.
  Upon opening the room after seven days, we found all ten programmers 
  dead, clutching each other's throats, and thirteen new flavors of BSD."



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