PennMUSH Community
Show
Ignore:
Timestamp:
07/08/07 20:50:12 (1 year ago)
Author:
shawnw
Message:

Merged 1.8.3p4 into trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/trunk/hdrs/flags.h

    r919 r1032  
    2121  int type;             /**< Bitflags of object types this flag applies to */ 
    2222  int bitpos;           /**< Bit position assigned to this flag for now */ 
    23   int perms;            /**< Bitflags of who can set this flag */ 
    24   int negate_perms;     /**< Bitflags of who can clear this flag */ 
     23  uint32_t perms;            /**< Bitflags of who can set this flag */ 
     24  uint32_t negate_perms;     /**< Bitflags of who can clear this flag */ 
    2525}; 
    2626 
     
    166166 */ 
    167167 
    168 #define F_ANY           0x10    /* can be set by anyone - obsolete now */ 
    169 #define F_INHERIT       0x20    /* must pass inherit check */ 
    170 #define F_OWNED         0x40    /* can be set on owned objects */ 
    171 #define F_ROYAL         0x80    /* can only be set by royalty */ 
    172 #define F_WIZARD        0x100   /* can only be set by wizards */ 
    173 #define F_GOD           0x200   /* can only be set by God */ 
    174 #define F_INTERNAL      0x400   /* only the game can set this */ 
    175 #define F_DARK          0x800   /* only God can see this flag */ 
    176 #define F_MDARK         0x1000  /* admin/God can see this flag */ 
    177 #define F_ODARK         0x2000  /* owner/admin/God can see this flag */ 
    178 #define F_DISABLED      0x4000  /* flag can't be used */ 
    179 #define F_LOG           0x8000  /* Log when the flag is set/cleared */ 
     168#define F_ANY           0x10U    /**< can be set by anyone - obsolete now */ 
     169#define F_INHERIT       0x20U    /**< must pass inherit check */ 
     170#define F_OWNED         0x40U    /**< can be set on owned objects */ 
     171#define F_ROYAL         0x80U    /**< can only be set by royalty */ 
     172#define F_WIZARD        0x100U   /**< can only be set by wizards */ 
     173#define F_GOD           0x200U   /**< can only be set by God */ 
     174#define F_INTERNAL      0x400U   /**< only the game can set this */ 
     175#define F_DARK          0x800U   /**< only God can see this flag */ 
     176#define F_MDARK         0x1000U  /**< admin/God can see this flag */ 
     177#define F_ODARK         0x2000U  /**< owner/admin/God can see this flag */ 
     178#define F_DISABLED      0x4000U  /**< flag can't be used */ 
     179#define F_LOG           0x8000U  /**< Log when the flag is set/cleared */ 
     180 
     181#define F_MAX           0x00800000U /**< Largest allowed flag bit */ 
     182 
     183 
     184/* Flags can be in the flaglist multiple times, thanks to aliases. Keep 
     185   a reference count of how many times, and free memory when it goes to 0. */ 
     186#define F_REF_MASK      0xFF000000U /**< Mask to get the reference count */ 
     187#define F_REF_NOT       0x00FFFFFFU /**< Everything but */ 
     188#define FLAG_REF(r)     (((r) & F_REF_MASK) >> 30) 
     189#define ZERO_FLAG_REF(r) ((r) & F_REF_NOT) 
     190#define INCR_FLAG_REF(r) ((r) + (1 << 30)) 
     191#define DECR_FLAG_REF(r) ((r) - (1 << 30)) 
    180192 
    181193