Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)
Home

[Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Dec 2001 16:58:58 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Dec 09, 2001 at 03:28:17AM -0800, Gregory Berkolaiko wrote:

[ the attachment is broken ]

> This is a patch which changes interface of generate_warmap to:
> 1. Remove direct calls to really_generate_warmap

> 2. Provide the possibility of having a local warmap

Very nice.

> 3. Make recycling of the old warmap more transparent (I hope)

I have to see the code for this.

> There is no rush with inclusion into CVS, but I would be grateful if you
> comment on the implementation and on what else should be done.
> 
> Brief description:
> 
> To generate warmap now one has to pass the pointer to it.  If the pointer
> is NULL, the static warmap local to gotohand.c is used.
> Access and creator/destructor functions for warmaps are also provided.
> 
> Functions like find_the_shortest_paths use local warmap by default (which
> renders it unrecyclable).
> 
> The old recycling rules are left in place.
> 
> Tested: the savegames are identical.
> 
> It is now possible to have warmap-per-city in the AI.  Even if all 
> warmaps are refreshed every turn (unnecessary, but happens now), it will
> still save some time (but not memory).

Please resend the patch.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I haven't lost my mind - it's backed up on tape somewhere."


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