Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: mapgen.c
Home

[Freeciv-Dev] Re: mapgen.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: mapgen.c
From: Erik Sigra <freeciv@xxxxxxx>
Date: Sat, 02 Sep 2000 22:56:57 +0200

Erik Sigra wrote:
> 
> Hi,
> Could the person responisble for mapgen.c please go through it and add a
> lot of comments?

Or at least someone who understands it fairly well, the original author
may be disinvolved now.

I wanted to improve  the river creation and maybe even add lakes. But
the code is somewhat (but not terribly) opaque.

> Because more comments could be useful. Especially
> function descriptions and variabe descritions. I would also appreciate
> longer and more descriptive variable names. There are some 1-letter
> variables, and some with general names such as "counter" and "number".
> Please change them to something more descriptive like foo_counter and
> number_of_bars!

Now I'm more specific. Here are some examples of variables:
struct isledata: goodies, starters
static int make_river(int x,int y): mini, mp, res
static void make_land(void): tres, count
static void setup_isledata(void): good, mingood, maxgood, riches,
starters, isles, oldisles, goodisles, guard1
void create_start_positions(void): nr, dist, sum
and many more...

I don't understand the difference between the 2 concepts islands and
continents. The seem to mixed arbitrary. Can someone explain?

I have added some comments myself (although not very deep ones). I have
tried to make them correct. Some of them are just question marks,
because I didn't know what the instructions do (someone wanna replace
them with something useful?).

Attachment: mapgen_comments.diff.bz2
Description: Binary data


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