Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] topology patches
Home

[Freeciv-Dev] topology patches

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] topology patches
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Sat, 27 Oct 2001 04:46:21 -0400
Reply-to: jdorje@xxxxxxxxxxxx

I have the following topology patches prepared or planned.  All of them
are relatively small.

check_map_pos : this doesn't deal specifically with topologies but it's
the same code that's being affected.  Since it's a pretty
straightforward change and one that we should have in CVS for as much
time as possible before the next release, this should get first billing.

rand_pos: this creates a rand_pos function in mapgen.c.  It's a small
issue, but it's been argued liberally: what form should rand_pos take?

map_iterate: this changes the map iteration loops to use
regular_map_pos_is_normal.  It is currently being held up (I believe) by
several factors: (1) regular_map_pos_is_normal overlaps with rand_pos,
(2) there was some thought of removing print_landarea_map in game.c, (3)
Ross isn't happy with the form of many of the loops.  I'll propose an
"updated" version of this shortly, though.

mapgen: (not yet proposed) this updates all of mapgen to be
topology-independent.  It uses distance_from_pole,
distance_from_[north|south]_pole, and (possibly) distance_from_edge to
do the map computations.  rand_pos needs to be dealt with first, though.

diff_map_pos: (not yet proposed) this introduces a function,
diff_map_pos (or similar naming) that determines the difference between
two map positions.  It will be necessary for straightest_direction,
dir_ok, is_cardinal_move, [xy]dist, and other GOTO code to be
topology-independent.

misc_topology: (not yet proposed) miscellaneous cleanups may include
moving map_adjust_[xy] into client-only code, removing any remaining
topology-dependent code, etc.

At that point, we should have a topology-independent server (well, OK
probably not...it's hard to verify such things...).  We can then move on
to the client.  This will be a bigger job, depending on how much cleanup
we want to do in the process, but at least we can do some testing as we
go along.

jason


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