1stMUD4.0/bin/
1stMUD4.0/doc/MPDocs/
1stMUD4.0/player/
1stMUD4.0/win32/
1stMUD4.0/win32/rom/
/**************************************************************************
*  Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,        *
*  Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.   *
*                                                                         *
*  Merc Diku Mud improvements copyright (C) 1992, 1993 by Michael         *
*  Chastain, Michael Quan, and Mitchell Tse.                              *
*                                                                         *
*  In order to use any part of this Merc Diku Mud, you must comply with   *
*  both the original Diku license in 'license.doc' as well the Merc       *
*  license in 'license.txt'.  In particular, you may not remove either of *
*  these copyright notices.                                               *
*                                                                         *
*  Much time and thought has gone into this software and you are          *
*  benefiting.  We hope that you share your changes too.  What goes       *
*  around, comes around.                                                  *
***************************************************************************
*       ROM 2.4 is copyright 1993-1998 Russ Taylor                        *
*       ROM has been brought to you by the ROM consortium                 *
*           Russ Taylor (rtaylor@hypercube.org)                           *
*           Gabrielle Taylor (gtaylor@hypercube.org)                      *
*           Brian Moore (zump@rom.org)                                    *
*       By using this code, you have agreed to follow the terms of the    *
*       ROM license, in the file Rom24/doc/rom.license                    *
***************************************************************************
*       1stMUD ROM Derivative (c) 2001-2003 by Ryan Jennings              *
*            http://1stmud.dlmud.com/  <r-jenn@shaw.ca>                   *
***************************************************************************/

#if !defined(TABLES_H)
#define TABLES_H

/* game tables */
EXTERN const struct position_type position_table[];
EXTERN const struct sex_type sex_table[];
EXTERN const struct size_type size_table[];

/* flag tables */
EXTERN const struct flag_type act_flags[];
EXTERN const struct flag_type plr_flags[];
EXTERN const struct flag_type affect_flags[];
EXTERN const struct flag_type off_flags[];
EXTERN const struct flag_type imm_flags[];
EXTERN const struct flag_type form_flags[];
EXTERN const struct flag_type part_flags[];
EXTERN const struct flag_type comm_flags[];
EXTERN const struct flag_type extra_flags[];
EXTERN const struct flag_type wear_flags[];
EXTERN const struct flag_type container_flags[];
EXTERN const struct flag_type portal_flags[];
EXTERN const struct flag_type room_flags[];
EXTERN const struct flag_type exit_flags[];
EXTERN const struct flag_type mprog_flags[];
EXTERN const struct flag_type oprog_flags[];
EXTERN const struct flag_type rprog_flags[];
EXTERN const struct flag_type area_flags[];
EXTERN const struct flag_type sector_flags[];
EXTERN const struct flag_type door_resets[];
EXTERN const struct flag_type wear_loc_strings[];
EXTERN const struct flag_type wear_loc_flags[];
EXTERN const struct flag_type res_flags[];
EXTERN const struct flag_type vuln_flags[];
EXTERN const struct flag_type type_flags[];
EXTERN const struct flag_type apply_flags[];
EXTERN const struct flag_type sex_flags[];
EXTERN const struct flag_type furniture_flags[];
EXTERN const struct flag_type weapon_class[];
EXTERN const struct flag_type apply_types[];
EXTERN const struct flag_type weapon_type2[];
EXTERN const struct flag_type size_flags[];
EXTERN const struct flag_type position_flags[];
EXTERN const struct flag_type ac_type[];
EXTERN const struct bit_type bitvector_type[];
EXTERN const struct colour_type colour_attributes[];
EXTERN const struct colour_type colour_foregrounds[];
EXTERN const struct colour_type colour_backgrounds[];
EXTERN const struct cslot_type cslot_table[MAX_CUSTOM_COLOUR];
EXTERN const struct flag_type desc_flags[];
EXTERN const struct vnum_type vnum_table[];
EXTERN const struct flag_type info_flags[];
EXTERN const struct flag_type log_flags[];
EXTERN const struct spfun_type spell_table[];
EXTERN const struct gsn_type gsn_table[];
EXTERN const struct flag_type target_flags[];
EXTERN const struct flag_type chan_types[];
EXTERN const struct tzone_type tzone_table[MAX_TZONE];
EXTERN const struct flag_type mud_flags[];
EXTERN const struct flag_type ignore_flags[];
EXTERN const struct directory_type directories_table[];
EXTERN const struct flag_stat_type flag_stat_table[];

struct flag_type
{
	const char *name;
	flag_t bit;
	bool settable;
};

struct flag_stat_type
{
	const char *name;
	const struct flag_type *structure;
	bool stat;
};

struct clan_rank
{
	const char *rankname;
};

struct clan_type
{
	const char *name;
	const char *who_name;
	vnum_t hall;
	bool independent;			/* true for loners */
	RANK_DATA rank[MAX_RANK];
	CLAN_DATA *next, *prev;
	bool valid;
};

struct position_type
{
	const char *name;
	const char *short_name;
};

struct sex_type
{
	const char *name;
};

struct size_type
{
	const char *name;
};

struct bit_type
{
	const struct flag_type *table;
	const char *help;
};

struct colour_type
{
	const char *name;
	int col_type;
};

struct cslot_type
{
	const char *name;
	int slot;
	int col_attr;
	int col_fore;
	int col_back;
};

struct vnum_type
{
	vnum_t vnum;
	int type;
};

struct spfun_type
{
	const char *name;
	SPELL_FUN *fun;
};

struct tzone_type
{
	const char *name;
	const char *zone;
	int gmt_offset;
	int dst_offset;
};

struct gsn_type
{
	const char *name;
	int *pgsn;
};

struct directory_type
{
	const char *text;
	const char *directory;
};

/* vnum types */
#define VNUM_OBJ    1
#define VNUM_ROOM   2
#define VNUM_MOB    3
#define VNUM_MPROG  4

PROTOTYPE(flag_t flag_value, (const struct flag_type *, const char *));
PROTOTYPE(const struct flag_type *flag_lookup,
		  (const char *, const struct flag_type *));
PROTOTYPE(const char *flag_string, (const struct flag_type *, flag_t));
PROTOTYPE(void show_flag_cmds, (CHAR_DATA *, const struct flag_type *));
PROTOTYPE(bool is_stat, (const struct flag_type *));

#endif