[Freeciv-Dev] Cleaning up gotohand.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To reduce the time taken by warmap generation and improve the quality of
the warmap I am undertaking an effort to implement the suggestion given
in the comment to really_generate_warmap
http://www.freeciv.org/lxr/source/server/gotohand.c?v=cvs#L261
I would like to divide the warmap generation into several subfunctions
which could be called in, say, ai_find_someplace_to_go
warmap_initialize(...);
while (warmap_next_position(&x, &y)) {
...
if (evaluate_position(x,y))
warmap_process_position(x,y);
if (found_someplace_to_go(x,y))
break;
}
This might increase volume of the code, but will make it neater, for
sure.
But this is the aim. For now I am proposing a verrrrry small patch.
Just some surface cleaning. The function init_gotomap just calls
init_warmap and thus is unnecessary.
Tested: the savegames of the test runs are identical to current CVS'.
Best,
G.
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
remove_init_gotomap.diff
Description: remove_init_gotomap.diff
- [Freeciv-Dev] Cleaning up gotohand.c,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/18
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/18
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/19
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Gregory Berkolaiko, 2001/09/20
- [Freeciv-Dev] Re: Cleaning up gotohand.c, Raimar Falke, 2001/09/20
|
|