/* $Id: lorenai.h,v 1.5 1997/07/01 14:44:42 archer Exp $
 *	LORENAI.H - Various structures
 */
#include <stdio.h>
#include <Widget/Color.h>


/**
 ** Global types
 **/
typedef struct l_item	item_s;
typedef struct l_ttype	ttype_s;
typedef struct l_aname	aname_s;
typedef struct l_poss	poss_s;
typedef struct l_build	build_s;
typedef struct l_area	area_s;


/**
 ** Definition structures
 **/
struct l_item {			/* Item type */
	item_s	*next;
	char	*plural;
	char	*singular;
	char	man;
	char	leader;
};

struct l_ttype {		/* Terrain type */
	ttype_s		*next;
	char		*name;
	X11_color	worldview;
	short		move;
};

struct l_aname {		/* Area (province) name */
	aname_s	*next;
	char	*name;
};

struct l_poss {			/* Possession/market */
	poss_s	*next;
	item_s	*kind;
	int	amount;
	int	price;
};

struct l_build {		/* Structure */
	build_s	*next;
	build_s	*list;
	area_s	*area;
	ttype_s	*type;
	char	*name;
	int	number;
};

struct l_area {			/* Location */
	ttype_s	*type;
	aname_s	*name;
	item_s	*inhabitants;
	poss_s	*sold,
		*wanted,
		*products;
	build_s	*structures;
	long	income;
	long	entertain;
	int	population;
	short	wages;
	short	faction_checked;
	char	taxed;
	char	year_checked;
	char	month_checked;
/* Visual */
	char	highlighted;
	char	update_needed;
};


/**
 ** Some constants
 **/
#define MAX_MAP	100


/**
 ** Global variables
 **/
extern char	*my_faction_name;
extern int	my_faction_number;
extern ttype_s	*area_types,
		unknown_area_type;
extern aname_s	*area_names;
extern item_s	*known_items;
extern build_s	*all_buildings;
extern int	month, year;
extern area_s	lorenai_map[MAX_MAP+1][MAX_MAP+1];
extern char	work[8192];
