[Freeciv-Dev] Re: (PR#8643) RFC: new file for topology code
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#8643) RFC: new file for topology code |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Thu, 6 May 2004 10:37:13 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8643 >
Jason Short wrote:
> I'd like to create a new file common/topology for the topology code. We
> have a growing amount of such code, and since a lot of it is inline it
> is cluttering up map.h.
> We might consider making all topology functions inline and having _only_
> common/topology.h.
Not possible. However we may eventually inline/macro more of the functions.
> If nobody's opposed to the general idea, I'll make a list of what code
> can be moved.
The list is quite long. See the attachment. Because of all the
iterators and long macros topology.h will be bigger than map.h. But
topology.c will be much smaller than map.c.
If nobody still objects, I will make a patch.
jason
enum topo_flag
CURRENT_TOPOLOGY
topo_has_flag
MAX_MAP_INDEX
CHECK_MAP_POS
CHECK_INDEX
native_pos_to_index
index_to_native_pos
native_to_map_pos
map_to_native_pos
do_in_native_pos
map_pos_to_index
index_to_map_pos
DIRSTEP
MAPSTEP
is_real_map_pos
is_normal_map_pos
normalize_map_pos
nearest_real_pos
map_distance_vector
map_num_tiles
rand_neighbour
rand_map_pos
rand_map_pos_filtered
is_move_cardinal
iterate_outward[_end]
rectangle_iterate[_end]
square_dxy_iterate[_end]
square_iterate[_end]
circle_iterate[_end]
adjc_iterate[_end]
adjc_dir_iterate[_end]
whole_map_iterate[_end]
enum direction8
dir_vector
DIR_REVERSE
DIR_IS_CARDINAL
dir_cw
dir_ccw
dir_get_name
is_valid_dir
DIR_DX
DIR_DY
CAR_DIR_DX
CAR_DIR_DY
cartesian_adjacent_iterate
cartesian_adjacent_iterate[_end]
IS_BORDER_MAP_POS
- [Freeciv-Dev] Re: (PR#8643) RFC: new file for topology code,
Jason Short <=
|
|