/* General TeenyMUD header file */ /* Object element codes, for use when accessing the DB with get_int_elt() et. al. */ /* These gadgets are all integers */ #define FLAGS 0 #define NAME 1 #define PENNIES 2 #define LOC 3 /* Home, dropto, and destination are the same */ #define HOME 4 #define DROPTO 4 #define DESTINATION 4 #define OWNER 5 #define CONTENTS 6 #define EXITS 7 /* This is a bizzare array of ints. */ #define LOCK 8 /* The obvious strings */ #define SUC 9 #define OSUC 10 #define FAIL 11 #define OFAIL 12 #define DESC 13 /* Next thing in a contents/exits list */ #define NEXT 14 /* Another integer code */ #define TIMESTAMP 15 /* Various defines for the fields of the flags. */ /* Leave the type field in the low order bits ot DIE. */ #define TYPE_MASK 0x0003 #define TYP_PLAYER 0 #define TYP_THING 1 #define TYP_ROOM 2 #define TYP_EXIT 3 /* External flags */ #define STICKY 0x0004 #define WIZARD 0x0008 #define TEMPLE 0x0010 #define LINK_OK 0x0020 #define DARK 0x0040 /* Flags used internally by the DB gear. You are resonsible for NOT fucking with these */ #define FREE_CHUNK 0x1000 #define IN_MEMORY 0x2000 #define DIRTY 0x4000 #define ALIVE 0x8000 /* A mask for the internal use flags */ #define INTERNAL_FLAGS 0xF000 /* More generic stuff for everyone. */ /* We refuse to display more than this many items from a contents/exits list */ #define MAXLIST 512 #define TRUE 1 #define FALSE 0 /* A useful constant to have around. */ #define BUFFSIZ 512 /* System tuning thingies. */ /* timeslice == 10 tenths of a sec, quota == 10 commands per slice */ #define TIME_SLICE 10 #define SLICE_QUOTA 10 /* Dump every 3600 seconds, please. */ #define DUMP_INTERVAL 3600 /* Define this if you want all commands logged to stderr */ /* #define LOGCOMMANDS */ /* Define this if you want timestamping support. */ #define TIMESTAMPS /* Default names of chunk/index files. Default cache size. These are used if none are specified on the command line */ #define DEFAULT_CHUNK "chunky.bits" #define DEFAULT_INDEX "chunky.index" #define DEFAULT_CACHE 20 * 1024 /* Possible MUD statuses */ #define RUNNING 0 #define DUMPING 1 #define STOPPED 2 /* Because STUPID FUCKING tolower() is sometimes broken */ #define DOWNCASE(c) (isupper(c) ? tolower(c) : (c)) /* Forward function declarations. None of that ANSI shit here. */ extern void destroy_obj(); extern void animate(); extern char *ty_malloc(); extern long get_chunk(); extern struct obj_data *disk_thaw(); extern void unlock_cache(); extern struct dsc *get_descriptor(); extern char *ty_itoa(); extern int *bool_parse(); extern int match_player(); extern int match_who(); extern void iobdisconnect(); extern void iobdrop(); extern void iobflush(); extern void notify_player(); extern void notify_wall(); extern void iosync(); extern void iobput(); extern void iowrap();