PennMUSH Community
Show
Ignore:
Timestamp:
06/12/07 15:21:47 (1 year ago)
Author:
shawnw
Message:

1.8.3p3

Files:

Legend:

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

    r846 r919  
    1818#include "chunk.h" 
    1919 
    20 extern dbref first_free;   /* pointer to free list */ 
     20extern dbref first_free;        /* pointer to free list */ 
    2121 
    2222/*------------------------------------------------------------------------- 
     
    104104#define ThingListen(x)  (IS(x, TYPE_THING, "MONITOR")) 
    105105#define ThingInhearit(x) \ 
    106                         (IS(x, TYPE_THING, "LISTEN_PARENT"))   /* 0x80 */ 
     106                        (IS(x, TYPE_THING, "LISTEN_PARENT"))    /* 0x80 */ 
    107107#define ThingZTel(x)            (IS(x, TYPE_THING, "Z_TEL")) 
    108108 
    109109/******* Room toggles */ 
    110 #define Floating(x)     (IS(x, TYPE_ROOM, "FLOATING")) /* 0x8 */ 
    111 #define Abode(x)        (IS(x, TYPE_ROOM, "ABODE"))    /* 0x10 */ 
    112 #define JumpOk(x)       (IS(x, TYPE_ROOM, "JUMP_OK"))  /* 0x20 */ 
    113 #define NoTel(x)        (IS(x, TYPE_ROOM, "NO_TEL"))   /* 0x40 */ 
    114 #define RoomListen(x)   (IS(x, TYPE_ROOM, "LISTENER")) /* 0x100 */ 
    115 #define RoomZTel(x)             (IS(x, TYPE_ROOM, "Z_TEL"))    /* 0x200 */ 
    116 #define RoomInhearit(x) (IS(x, TYPE_ROOM, "LISTEN_PARENT"))    /* 0x400 */ 
    117  
    118 #define Uninspected(x)  (IS(x, TYPE_ROOM, "UNINSPECTED"))  /* 0x1000 */ 
     110#define Floating(x)     (IS(x, TYPE_ROOM, "FLOATING"))  /* 0x8 */ 
     111#define Abode(x)        (IS(x, TYPE_ROOM, "ABODE"))     /* 0x10 */ 
     112#define JumpOk(x)       (IS(x, TYPE_ROOM, "JUMP_OK"))   /* 0x20 */ 
     113#define NoTel(x)        (IS(x, TYPE_ROOM, "NO_TEL"))    /* 0x40 */ 
     114#define RoomListen(x)   (IS(x, TYPE_ROOM, "LISTENER"))  /* 0x100 */ 
     115#define RoomZTel(x)             (IS(x, TYPE_ROOM, "Z_TEL"))     /* 0x200 */ 
     116#define RoomInhearit(x) (IS(x, TYPE_ROOM, "LISTEN_PARENT"))     /* 0x400 */ 
     117 
     118#define Uninspected(x)  (IS(x, TYPE_ROOM, "UNINSPECTED"))       /* 0x1000 */ 
    119119 
    120120#define ZTel(x) (ThingZTel(x) || RoomZTel(x)) 
    121121 
    122122/******* Exit toggles */ 
    123 #define Cloudy(x)       (IS(x, TYPE_EXIT, "CLOUDY"))   /* 0x8 */ 
     123#define Cloudy(x)       (IS(x, TYPE_EXIT, "CLOUDY"))    /* 0x8 */ 
    124124 
    125125/* Flags anything can have */ 
     
    142142#define Mistrust(x)     (has_flag_by_name(x, "MISTRUST", TYPE_THING|TYPE_EXIT|TYPE_ROOM)) 
    143143#define NoCommand(x)    (has_flag_by_name(x, "NO_COMMAND", NOTYPE)) 
    144 #define NoWarn(x)       (has_flag_by_name(x, "NOWARN", NOTYPE)) 
     144#define NoWarn(x)       (has_flag_by_name(x, "NO_WARN", NOTYPE)) 
    145145#define Opaque(x)       (has_flag_by_name(x, "OPAQUE", NOTYPE)) 
    146146#define Orphan(x)       (has_flag_by_name(x, "ORPHAN", NOTYPE)) 
     
    229229 */ 
    230230struct object { 
    231   const char *name;        /**< The name of the object */ 
     231  const char *name;             /**< The name of the object */ 
    232232  /** An overloaded pointer. 
    233233   * For things and players, points to container object. 
     
    236236   */ 
    237237  dbref location; 
    238   dbref contents;      /**< Pointer to first item */ 
     238  dbref contents;               /**< Pointer to first item */ 
    239239  /** An overloaded pointer. 
    240240   * For things and players, points to home. 
     
    243243   */ 
    244244  dbref exits; 
    245   dbref next;          /**< pointer to next in contents/exits chain */ 
    246   dbref parent;            /**< pointer to parent object */ 
    247   struct lock_list *locks; /**< list of locks set on the object */ 
    248   dbref owner;         /**< who controls this object */ 
    249   dbref zone;          /**< zone master object number */ 
    250   int penn;            /**< number of pennies object contains */ 
    251   int warnings;            /**< bitflags of warning types */ 
    252   time_t creation_time;        /**< Time/date of object creation */ 
     245  dbref next;                   /**< pointer to next in contents/exits chain */ 
     246  dbref parent;                 /**< pointer to parent object */ 
     247  struct lock_list *locks;      /**< list of locks set on the object */ 
     248  dbref owner;                  /**< who controls this object */ 
     249  dbref zone;                   /**< zone master object number */ 
     250  int penn;                     /**< number of pennies object contains */ 
     251  warn_type warnings;           /**< bitflags of warning types */ 
     252  time_t creation_time;         /**< Time/date of object creation */ 
    253253  /** Last modifiction time. 
    254254   * For players, the number of failed logins. 
     
    256256   */ 
    257257  time_t modification_time; 
    258   int attrcount;       /**< Number of attribs on the object */ 
    259   int type;            /**< Object's type */ 
    260   object_flag_type flags;  /**< Pointer to flag bit array */ 
    261   object_flag_type powers; /**< Pointer to power bit array */ 
    262   ALIST *list;         /**< list of attributes on the object */ 
     258  int attrcount;                /**< Number of attribs on the object */ 
     259  int type;                     /**< Object's type */ 
     260  object_flag_type flags;       /**< Pointer to flag bit array */ 
     261  object_flag_type powers;      /**< Pointer to power bit array */ 
     262  ALIST *list;                  /**< list of attributes on the object */ 
    263263}; 
    264264 
     
    268268 */ 
    269269struct db_stat_info { 
    270   int total;   /**< Total count */ 
    271   int players; /**< Player count */ 
    272   int rooms;   /**< Room count */ 
    273   int exits;   /**< Exit count */ 
    274   int things;  /**< Thing count */ 
    275   int garbage; /**< Garbage count */ 
     270  int total;    /**< Total count */ 
     271  int players;  /**< Player count */ 
     272  int rooms;    /**< Room count */ 
     273  int exits;    /**< Exit count */ 
     274  int things;   /**< Thing count */ 
     275  int garbage;  /**< Garbage count */ 
    276276}; 
    277277 
     
    291291#define DOLIST_VISIBLE(var, first, player)\ 
    292292    for((var) = first_visible((player), (first)); GoodObject((var)); (var) = first_visible((player), Next(var))) 
     293 
     294typedef uint32_t mail_flag; 
    293295 
    294296/** A mail message. 
     
    298300 */ 
    299301struct mail { 
    300   struct mail *next;       /**< Pointer to next message */ 
    301   struct mail *prev;       /**< Pointer to previous message */ 
    302   dbref to;            /**< Recipient dbref */ 
    303   dbref from;          /**< Sender's dbref */ 
    304   time_t from_ctime;       /**< Sender's creation time */ 
    305   chunk_reference_t msgid; /**< Message text, compressed */ 
    306   time_t time;         /**< Message date/time */ 
    307   unsigned char *subject;  /**< Message subject, compressed */ 
    308   int read;            /**< Bitflags of message status */ 
     302  struct mail *next;            /**< Pointer to next message */ 
     303  struct mail *prev;            /**< Pointer to previous message */ 
     304  dbref to;                     /**< Recipient dbref */ 
     305  dbref from;                   /**< Sender's dbref */ 
     306  time_t from_ctime;            /**< Sender's creation time */ 
     307  chunk_reference_t msgid;      /**< Message text, compressed */ 
     308  time_t time;                  /**< Message date/time */ 
     309  unsigned char *subject;       /**< Message subject, compressed */ 
     310  mail_flag read;               /**< Bitflags of message status */ 
    309311}; 
    310312 
     
    318320    player = cause; 
    319321 
    320 #endif             /* __DBDEFS_H */ 
     322#endif                          /* __DBDEFS_H */