Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: generalized unit capabilities
Home

[Freeciv-Dev] Re: generalized unit capabilities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: Freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: generalized unit capabilities
From: Andrew Sutton <ansutton@xxxxxxx>
Date: Wed, 5 Dec 2001 11:46:05 -0500

On Wednesday 05 December 2001 11:28 am, Raimar Falke wrote:
> On Wed, Dec 05, 2001 at 09:26:23AM -0500, Andrew Sutton wrote:
> > all,
>
> Patches please in unified format.

what kind of format are you looking for?

>
> > here is a patch that provides a patch that extends the flag space of unit
> > capabilities.
> >
> > for lack of anything better to do all the document is in-code using
> > javadoc (so it will extract nicely :)
>
> Doxygen is all nice but still nobody has send a patch to add a make
> target for this.

i don't know how :( can somebody who knows how to use autoconf, automake 
please give me some pointers here?

anyway, the comments won't hurt the code any.

> The question is still: why dislike you the flat namespace of the enum?
> Why do you need more structure?

what do you mean? it is a flat namespace. it's a hierarchical storage. it 
just made sense that if you want to inrease flag space for something you move 
from a single byte field to a mult-byte field. segregating capabilities into 
category gives a sense of organization and can help prevent flag value 
collisions for two patches adding a new unit capability (e.g. i want a 
terrorist capability, bob wants a build outhouse capability). two flags, two 
categories, no problem.

besides, when has structure ever been a bad thing :)

> About running out of space for bits for the flags: I agree that this
> is a problem, but a problem which can be solved in a 100 lines patch.

that is about 100 lines of code. the bulk of it is comment and #defines. i 
could strip the comments and push everything into a much more "concise" 
format if it would make you feel better ;) i bet i could rewrite it to be 
about 30 lines of code (and submit an entry to the OCCC).

andy


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