Bitvectors

From: David Cole (tiznor@hotmail.com)
Date: 01/03/02


Hello all, I'm at the end of my rope, totally baffled, and dumbfounded as to
why this <insert curse word here> won't work correctly. Well As the subject
say's I have been fooling with bitvectors. I have created new AFF2_ AFF3_
AFF4_ flags cause I ran out of AFF_ flags pretty fast when I added about
200+ new spells. Now I went into struct.h and added:

long bitvector2;
long bitvector3;
long bitvector4;

In all appropriate places, then added the:

long affected_by2;
long affected_by3;
long affected_by4;

In struct char_special_data_saved. Then anywhere in the code that I needed
to use an AFF2, 3 ,4 flag I just simply replace af[i].bitvector =
AFF_WHATEVER with af[i].bitvector2 = AFF2_WHATEVER. Easy simple and done,
but of course, when is anything ever that simple? I found out fast that the
AFF2_ etc flags where not being assigned at all when being told to assign to
a char, I found out why, I had forgotten to edit handler.c affect_modify()
and other, I simply add in all the appropriate places the bitvector2, 3, 4.
After doing this, compiling, logging on, and what not, the flags where being
set now.. however, now that the flags are being set, they can't be removed..
now when you go invis, c 'invis' self and then type vis to go vis, it says
you are already visible. Pretty wacked huh? So now, I believe the mud is
setting the AFF  flags, but not setting them.. I am completely and utterly
baffled as to why this is doing this...

The changes have been riddled through out the mud, other wise I would be
posting segments of code into this email for even more detail. I've gone
through to most the places in the code and changed bitvector_t to long, it
seemed to help in the aiding of setting the AFF flags to the char. This
email seems pretty clear to me, however if more detail is needed by all
means ask and you shale recive, I would really appreciate any help from
anyone, I've read posts about this subject in the archives, but never any
solutions, or questions.

For those of you who are going to say use the 128 bit patch on the ftp, I
cannot cause I am running Circle30bpl17 on a WIN32 platform, and for those
of you are going to say use bitfields, I cannot cause for some odd reason,
they will not compile or work correctly. I found this the easyest way to go
about adding and making AFF2 flags work, but obviously they are not
working.. or are but are slightly broken, anyways, please help, anyone..

Many thanks,
Dave (Tiznor)

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT