Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] that map editor thingy
Home

Re: [Freeciv-Dev] that map editor thingy

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] that map editor thingy
From: Daniel Gudlat <gudlat@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Feb 1999 13:04:34 +0100 (MET)

Hello FreeCiv team,
Nicolas wrote:
> On Mon, 1 Feb 1999, Daniel Gudlat wrote:
> >    It's re-using lot's of legacy FreeCiv (v 1.6.3) code from /common and
> >    /server), and I intend to keep it that way, in fact, I think it's the
> >    only sane way to go. Keeping the thing up to date is probably easier
> >    if code changes don't have to be duplicated.
>
> yes !
>
> >    Also, that way, extending
> >    its ability to a full blown all-purpose map editor means mostly writing
> >    a little new code and linking in more .o's from FreeCiv (as far as the
> >    code kludge allows. In fact, I had to make some dummy procedures for
> >    things like find_city_by_id(), that (a) I don't need in the editor, (b)
> >    no procedure that is needed in the editor needs, and (c) is called by
> >    other procedures in the same module).
>
> I don't understand.
>

OK let me rephrase my somewhat convoluted statement, and give an example:
There's LOTS of interdependency between modules in freeciv. It's almost
impossible to link a single module or a few into another programm like
CivWorld, without also having to link in lots of other modules that are
not needed at all for this program. A prominent example is the
find_city_by_id function, which is called from virtually everywhere.
I don't need it for CivWorld, but in the modules I need (server/maphand,
server/gamehand,...) there are functions (which I don't need), which call
find_city_by_id(). So the compiler complains to me.

Now I didn't want to link in all the city stuff, since i don't need it. So
what I had to do is write a dummy find_city_by_id() that does nothing but
make the compiler/linker happy.

Extending the abilities of CivWorld to include, for example, editing city
properties, would mean linking in the city stuff from FreeCiv (which in turn
depends on lots of other things), and writing my own functions in CivWorld.
Because of the interdependence of modules in FreeCiv, this path is not as
easy to take as i would like, since I don't want to link in all the libciv*.a
files, therby unnecessarily bloating CivWorld.

> >    Together with a small change in
> >    server/stdinhand.c this will also allow loading, modifying and
> >    saving scenarios in the server (Hi Lalo! ;-).
>  reinier Post <rp@xxxxxxxxxx> is doing the same thing.
> Your patches won't be comptible.
> Try to see what can be done about that.

Who, you or me? ;-) I don't know Reinier's patch. :-(

> >    In other words, it
> >    won't work with old versions of FreeCiv, although the save games
> >    it produces should be compatible at least with 1.7.2. (I'll have
> >    a look at the 1.6.3 sources that came with it, to see if I can
> >    extend backwards compatibility, if it is so wished... Capability
> >    strings are a problem here, but I've already mucked up a solution
> >    for this)
> Why it isn't compatible ?

The simple reason is that I added scenario capability to FreeCiv after
1.6.3 came out (since this is when I joined the effort), so anything
before 1.7.0 is inherently incompatible with scenarios. Furthermore,
scenarios with specials (gold, oil,...) don't work with anything prior
to my recent patch, since game_load treats them as if they didn't have
the specials information, and thus generates random specials upon
game start.

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!"


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