Re: Adding 31+ affect flags.

From: Pink Floyd (
Date: 11/07/95

   Anyways, what I'm asking for is:

   1) Multiple ideas (if any) to implement extra affect flags (bitvectors), and
      a way to preserve the present notation/use of the AFF macros, to preserve
      compability etc... If that's not impossible, just a solution .-)

Simply add in more long ints under the current aff flag..  in the 
struct char_special_data_saved, I changed 
long affected_by
long affected_by1
long affected_by2
long affected_by3
Then you can change, in utils.h
#define AFF_FLAGS(ch)  ((ch)->char_specials.saved.affected_by)
#define AFF_FLAGS1(ch)  ((ch)->char_specials.saved.affected_by1)
#define AFF_FLAGS2(ch) ...

Then you just have to remember which aff_flag any particular affect belongs
to - in structs.h:
/* AFF1 flags */
#define AFF_BLIND  (1 << 0)
#define AFF_INVISIBLE  (1 << 1)
/* AFF2 flags */
#define AFF_BLESS  (1 << 0)

or, optionally, you could put a 1 as the last char in all AFF1 flag names,
a 2 as the last char in all AFF2 flag names, etc.  Then, whether you call
AFF_FLAGS1 or AFF_FLAGS2 depends on whether you're checking BLIND or BLESS.

   2) If available the CODE for this.. i.e. structs.h, utils.h (macros), and
      whatever else is needed...

See above.

The downside of this is that you have to either a) pfile wipe, or b) write a
program to convert the old pfile to the new pfile, but since you couldn't 
figure out how to add an extra integer to a data structure, this might be 
difficult... ;-) 

Good luck

This archive was generated by hypermail 2b30 : 12/07/00 PST