Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] patching various things
Home

Re: [Freeciv-Dev] patching various things

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] patching various things
From: Daniel Gudlat <gudlat@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Feb 1999 10:48:44 +0100 (MET)

Hello FreeCiv team,
David wrote:
> Daniel Gudlat wrote:
> >   Also did some clean up in game_load() and deleted an (incorrect) comment
> >   by dwp. (The thing may still need an overhaul, but the rest was wrong...)
> 
> Do you mean the comment was incorrect previously, or that
> you've changed things and the comment no longer applies?

The comment was partly incorrect previously, as game_load returned with
the correct values (0-3) for all cases except scenario's that provided
specials together with the tile map. (This case has probably never been
really working: game_load returned 2 instead of 1.) So your claim, that
it only returned 0 or 1 was wrong to begin with. But I also fixed some
things in the game?load/save routines - partly by adding a new save game
capability - so all types of save games should work correctly now.

> By overhaul, I was envisaging something where the map struct
> (and perhaps the game struct) has some extra flags in it 
> which say exactly what has and hasn't been setup.

> Eg, currently you can call map_is_empty() to see if there is
> the basic terrain data; I would like similar info on whether
> there are specials, whether there are huts, whether there are
> player starts etc.  Then instead of having to check game.scenario
> and remember what the values mean, you would just do:
>    if (!have_specials)  create_specials()
> etc.

That would indeed by a much better and more flexible approach than what
is currently used. But AFAI can see, this would require not an overhaul,
but almost a complete rewrite of much of the save game handling code.
I'm always in favor of the program figuring out what's there instead of
assuming things and then breaking first a sweat, and then down, when it
finds out its assumptions were wrong. (And I know for a fact _I_ won't
make an attempt at this for at least 2 months, if ever, for various
reasons, not the least being too little time.)

In the same vein, I've had a look at mapgen 1 over the weekend, and
patched several things, so now all of the terrain options for the map
generation process, except riverlength, as well as the huts are now of
the unit "1-in-1000 tiles". I've also changed some help texts in
stdinhand.c, so they should be a little more helpful now...
(I would like it even more, if they were 1-in-1000-non-ocean-tiles, since
this would be closer to an intuitive understanding, but at least they now
mean the same for all generators.)

Bye,
-- 
Daniel "Gudy" Gudlat                (mailto:gudlat@xxxxxxxxxxxxxxxxxxxxxxx)
ICQ-UIN: 5258903               (http://www.informatik.hu-berlin.de/~gudlat)
"Let us do the undoable, let us think the unthinkable.  Let us prepare to
grapple with the ineffable itself, and see if we may not eff it after all!"

Attachment: mapgen.patch
Description: FreeCiv/civworld/mapgen.patch


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