[Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improv
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> 1. Elementarization of unit poperties:
>
> Many properties/abilities are organized as a bunch, i.e.
> (see unittype.h/enum unit_flag_id)
> F_SETTLERS (contains all the worker abilities like irrigation,
> roads, mines, removing pollution, etc.)
> F_CARAVAN (contains helping wonders, establishing trade routes)
> F_DIPLOMAT (contains all diplomatic abilities)
i wrote a patch some time ago that implemented a framework for doing this.
actually, its primary purpose was to address the eventual lack of bit space
in the unit flags field. it wasn't accepted because a) it was "too OO" - IIRC
and b) because i never wrote any code that actually used it. it was just
supposed to coexist.
it can be used to exactly what you're talking about. it changes the bit field
describing unit capabilities into an array. each byte in the array describes
some segment of capabilities/properties (like settler properties or diplomat
properties). each element of the array is a bit field describing the various
capabilities in the segment.
i also wrote code to load to the bit fields from the rulesets and xmit over
the network so there shouldn't be too much work there.
On Monday 14 January 2002 03:08 am, Raimar Falke wrote:
> While you are at a redesign: what about compound units (from AC)?
it could probably be used to solve this issue too, although somebody from the
AC team would have to look at it.
andy
- [Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improved Info Screens, (continued)
- [Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improved Info Screens, Per I. Mathisen, 2002/01/14
- [Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improved Info Screens, Petr Baudis, 2002/01/14
- [Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improved Info Screens, Niels Weber, 2002/01/15
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Jörg Zuther, 2002/01/17
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Per I. Mathisen, 2002/01/17
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Raimar Falke, 2002/01/18
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Per I. Mathisen, 2002/01/18
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Reinier Post, 2002/01/18
- [Freeciv-Dev] Re: Elementarization of Unit Properties, Per I. Mathisen, 2002/01/18
[Freeciv-Dev] Re: Hello; Elementarization of Unit Properties; New/Improved Info Screens,
Andrew Sutton <=
|
|