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: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Changing interface for generate_warmap (PR#1108)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Thu, 13 Dec 2001 17:40:55 +0000 (GMT)

> From the first email:
> 
> > Functions like find_the_shortest_paths use local warmap by default
> > (which renders it unrecyclable).
> 
> I don't see this.

What exactly is your question?

> Nobody needs to know the internals of struct move_cost_map. You can
> move this from gotohand.h to gotohand.c.

yes.

> 
> About the interface:
> 
> +void generate_warmap(struct move_cost_map *wm, int x, int y,
> +                    struct unit *punit);
> +int get_warmap_land(struct move_cost_map *wm, int x, int y);
> +int get_warmap_sea(struct move_cost_map *wm, int x, int y);
> 
> What do you think about:
> 
>   struct move_cost_map *generate_warmap(int x, int y, struct unit
>                                         *punit, int use_global_warmap);
> 
> This way the access calls doesn't need to be changed if you use a
> local warmap.

True.  But I thought changing access calls is a good thing.  At least for
testing: I suspect in few instances a wrong warmap is used.

You asked for incapsulation, didn't you?

G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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