Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8584) remove dio_[put|get]_city_map
Home

[Freeciv-Dev] Re: (PR#8584) remove dio_[put|get]_city_map

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8584) remove dio_[put|get]_city_map
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 25 Apr 2004 12:19:20 -0700
Reply-to: rt@xxxxxxxxxxx

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

On Sun, Apr 25, 2004 at 11:28:05AM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8584 >
> 
> Raimar Falke wrote:
> 
> >    BIT_STRING improvements[B_LAST+1];
> > -  CITY_MAP city_map[CITY_MAP_SIZE*CITY_MAP_SIZE+1];
> > +  CITY_MAP city_map[CITY_MAP_SIZE * CITY_MAP_SIZE];
> > 
> > You can do better here. Send the number of elements of the array. From
> > this the client can decide what the citymap positions are. I.e. you do
> > the old solution with an extra level of indirection.
> 
> I don't get it.  Isn't the number of elements of the array CITY_MAP_SIZE 
> * CITY_MAP_SIZE, or very close?

AFAIK this code change is a preparation for variable
sized-citymaps. What do you think the packet will looks like if these
are in place. IMHO it will look like:

  int city_map_elements;
  CITY_MAP city_map[MAX_CITY_MAP_SIZE * MAX_CITY_MAP_SIZE];

So we can start working on this format now. If we even know
MAX_CITY_MAP_SIZE now we don't have to change the packet format later.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Programming today is a race between software engineers striving to
  build bigger and better idiot-proof programs, and the Universe trying
  to produce bigger and better idiots. So far, the Universe is winning."
    -- Rich Cook




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