Re: [CODE] extra object flags

From: Shane Lee (mudmaster@Randor.zzn.com)
Date: 07/12/00


---- Begin Original Message ----

From: Torgny Bjers <tb@sbbs.se>
Sent: Wed, 12 Jul 2000 09:34:19 +0200
To: CIRCLE@post.queensu.ca
Subject: [CIRCLE] [CODE] extra object flags


  Server: CircleMUD 3.0, bpl 17
Add-ons: OasisOLC 2.0, Races, Classes, liblist, aedit 16
      OS: Windows NT 4.0 Server
Hardware: Dell Precision 210 Workstation, Dual Processor
Compiler: Microsoft Developer Studio 97, C++ 5.0

Hello,

I have a little problem with the extra object flags... I have more
than 32
so I started another one called ITEM2_.. but how do I get these to
work?
They do not work in the oedit menues, for obvious reasons, it's called
ITEM2_.. yes, but how do I fix this?  I read somewhere that the
bitvector
(or whatever it is called, I am not a terminology buff) cannot hold
more
than 32 values.  So how do I go about and solve this?  If you write
down
code examples, suggestions, anything, please specify where they go,
you
don't have to be overly explicit, just make it as simple as
possible... :)

>> code snippet <<

#define ITEM_NODISARM             (1 << 31)

#define ITEM2_ANTI_HUMAN          (1 << 1)
#define ITEM2_ANTI_HALFELF        (1 << 2)
#define ITEM2_ANTI_HOBBIT         (1 << 3)
#define ITEM2_ANTI_HIGHLANDER     (1 << 4)
#define ITEM2_ANTI_ELF            (1 << 5)
#define ITEM2_ANTI_DWARF          (1 << 6)
#define ITEM2_ANTI_DUCK           (1 << 7)
#define ITEM2_ANTI_CATMAN         (1 << 8)
#define ITEM2_ANTI_WOLFMAN        (1 << 9)
#define ITEM2_ANTI_GNOME          (1 << 10)

#define NUM_ITEM_FLAGS            42

>> snip snip <<

Kind regards,
Torgny Bjers


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+


---- End Original Message ----

There are a couple of ways to deal with this. If you have time, and a
LOT of patience, you could install the 128 bit patch available from
circle's FTP site, which would let you break through the 32
bit "wall" in all of the arrays. This is very tedious, and I'm
ashamed to say I didn't finish it before I gave up:-(
The other thing you could do, is to edit you OLC files (depending on
which version) and add the ability to set your new flags. Just copy
the existing setup for ITEM_x flags in oedit.c and (again, depending
on which version) in your olc.h file.
It took me a little while to figure out what I was doing wrong when I
tried to do it that way, but I finally figured it out.
Hrmm... maybe someone should write a snippet on how to do that...
*hint, hint*

-FIRE

Get your Free E-mail at http://randor.zzn.com
____________________________________________________________
Get your own Web-Based E-mail Service at http://www.zzn.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT