1stMUD/corefiles/
1stMUD/gods/
1stMUD/player/
1stMUD/win32/
1stMUD/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-2002 by Ryan Jennings              *
*            http://1stmud.dlmud.com/  <r-jenn@shaw.ca>                   *
***************************************************************************/

#if !defined(TABLES_H)
#define TABLES_H

/* game tables */
extern struct clan_type *clan_table;
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 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_chars[];
extern const struct cslot_type cslot_table[];
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[];

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

struct clan_type
{
	const char *name;
	const char *who_name;
	vnum_t hall;
	bool independent;			/* true for loners */
};

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;
	const char *code;
};

struct cslot_type
{
	const char *name;
	int slot;
	const char *def;
};

struct vnum_type
{
	vnum_t vnum;
	int type;
};

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

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

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

flag_t flag_value
args ((const struct flag_type * flag_table, const char *argument));
const struct flag_type *flag_lookup
args ((const char *name, const struct flag_type * f));
const char *flag_string
args ((const struct flag_type * flag_table, flag_t bits));
void show_flag_cmds (CHAR_DATA * ch, const struct flag_type *flag_table);
bool is_stat (const struct flag_type *flag_table);

#endif