[Freeciv-Dev] Re: generalized unit capabilities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wednesday 05 December 2001 01:18 pm, Raimar Falke wrote:
> Reread my paragraph. I'm talking about the technical structure.
then i'm not really sure what you're referring to since i'm not using any
structures, logically or in the code.
>
> > it's just an extended bitfield with named bytes in addition to named
> > flags. if you don't supply the category for flags then your bits end
> > up as a 64 bit value. then, this has to be split on lookups. i guess
> > if you mean the "scoped" names, then you're right, but i still don't
> > see that as a bad thing.
> >
> > people have been talking about the desire for generalized unit
> > capabilities for a while now. you yourself admitted that it was a
> > shortcoming - if not immediately, then eventually. now you say that
> > there's no benefit? this is just an additive patch.
> >
> > it won't affect any part of the game that chooses not to use it...
>
> No code uses it -> it is useless.
that was part of the point. it's there so people can use it if they want.
just because code isn't used immediately doesn't make it useless.
>
> > > I was thinking that the 100 lines would include comments.
> >
> > just curios. how would you do it?
>
> See the attached patch. Ok it uses 175 lines, isn't tested and doesn't
> contain the capability tests.
so you've done the same thing i have except you keep adding flag fields. now
when you test the flag you're going to have to explicitly state which field
to test instead allowing it to be looked up. it introduces a higher chance of
writing bugs since you're going to have to state which fields to test. it's
not any more or less efficient, aside from that, it's just not a very pretty
solution - but that's just my opinion.
andy
[Freeciv-Dev] Re: generalized unit capabilities, Vasco Alexandre Da Silva Costa, 2001/12/05
|
|