Complete.Org: Mailing Lists: Archives: freeciv-dev: September 1999:
Re: [Freeciv-Dev] Flags on demand
Home

Re: [Freeciv-Dev] Flags on demand

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Dev <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] Flags on demand
From: Peter Schaefer <schaefer@xxxxxx>
Date: Wed, 15 Sep 1999 11:57:26 +0200

Artur Biesiadowski wrote:
> 
> Currently there are some flags in rulesets and surely there will be
> more. All of them have hardcoded meanings. With C code it is maybe ok,
> but with script language we will be limiting ourselves.
> 
> My idea is to allow any flags to be defined. More they should be handled
> transparently to ruleset writer, script writer and even C writer (except
> few interface routines). So there will be no many flag fields, but just
> 
> has_unit_flag(int flag)
> has_city_flag(int flag)
> 
> etc.
> 
> Flag as int would not be available directly anywhere. It would have to
> be obtained through
> int get_unit_flag(const char * flagname)
> If we would like to sacrifice a bit of performance for readibility we
> could directly use has_unit_flag(const char * flagname) every time.
> 

Are there any flags that are used so often in the code that 
one would loose more than a bit of performance ?
I think movement related flags might fall in this category .. .

-- 
Peter Schäfer - mailto:schaefer@xxxxxx, schaefer@xxxxxx

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