Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] proposal for minor change in tilespec.c, map.c
Home

[Freeciv-Dev] proposal for minor change in tilespec.c, map.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] proposal for minor change in tilespec.c, map.c
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Mon, 27 Aug 2001 10:45:40 -0500 (CDT)

in my quest for smaller code base and greater maintainability, I would
like to get rid of tilespec.c from civworld/ and use the original one in
client/

The main reason I want to do this is that I need to make approx 150 bytes
of changes to a 50k file.

The issue: unfortuately for me, "ptile->known" is used for different
things in the client and in the server. I need to use them both. A way to
do this in tilespec.c without copying and changing it is to hijack
tile_is_known().

I can do this if:

1a. tile_is_known() is moved to someplace where I can tear the guts out of
   it.

2a. "calls" to ptile->known in client/tilespec.c are instead encapsulated 
   in tile_is_known().

way to do it:

1b. Simply do 2a. (a couple of changes)
2b. tile_is_known() is in map.c right now. The comment says it's only used
in the client. Let's move it into the client. The attached diff moves it
into civclient.c. There could be a better place (like a new climap.c)
A couple of #includes later, everything ought to work.

<gets down on hands and knees>
I would _really_ like to see a change very similar to this happen. Yes,
this change is mainly for me (and whoever maintains civworld in the
future).

However, perhaps this is the time to begin the discussion of when and how
(if ever and if possible) civworld gets merged into the main
tree. Obviously that is a _major_ change in the codebase. Right now I'm
asking for a few minor (and superficial) changes to make my life easier
(like there's also a tiny function in maphand.c that I don't want declared
static). 
</gets down on hands and knees>

What do people think? Is there a better way to do this? Is this too
much to ask? I'm all ears.

-mike

PS: I'm not asking that the attached diff be included in CVS. It is not
polished or tested (though the changes are minor) It's simply a look at
the kind of changes that will be required. And I know that it wouldn't
apply cleanly to today's CVS anyway.

Attachment: tile_is_known.diff
Description: Text document


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