Re: Bitvector_t woes: again

From: Mike Stilson (mike@velgarian.sytes.net)
Date: 09/15/02


On Fri, Sep 13, 2002 at 01:27:20AM -0700, Mathew Earle Reuther wrote:
>As usual, I am struggling with bitvector_t and 64 flag problems. :)
>
>Say I have a line like this:
>  sprintbit(GET_OBJ_EXTRA(OLC_OBJ(d)), extra_bits, bitbuf,
>    sizeof(bitbuf));
>
>I have 35 options in the menu itself.  I can choose 1-31 just fine, but
>when I press 32 or more, it prints out the wrong bits.  (Say 34 is
>ANTI_DRUID, it prints BLAZING UNUSED UNUSED UNUSED or something.)
>
>Any idea what causes this?  I'm been banging my head against bitvector

GET_OBJ_EXTRA() is a bitvector_t (unsigned long long int) right?


/* object flags; used in obj_data */
struct obj_flag_data {
        int     value[NUM_OBJ_VAL_POSITIONS];   /* Values of the item (see list) */
        int  level;
-->     bitvector_t     wear_flags;     /* Where you can wear it            */
-->     bitvector_t     extra_flags;    /* If it hums, glows, etc.          */
        int     weight;         /* Weigt what else                  */
        int     cost;           /* Value when sold (gp.)            */
        int     cost_per_day;   /* Cost to keep pr. real day        */
        int     timer;          /* Timer for object                 */
-->     bitvector_t     bitvector;      /* To set chars bits                */
        byte type_flag; /* Type of item                     */
};

--
   +---------------------------------------------------------------+
   | 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