/
/***********************************************************
*  This color code is based somewhat on Lopes color.      *
*  The big difference is I'm using tables for the colors  *
*  and custom color spots. If you already have Lopes      *
*  color installed, you should be able to install this    *
*  with minimal difficulty. Read the README.color file    *
*  included with this package for ROM installation        *
*  instructions. Please send bugs/fixes/comments to:      *
*  jessechoward@netscape.net                              *
*  This is just a development release so if something is  *
*  missing or you would like to see something in the next *
*  release, e-mail me and I will try to get it done.      *
***********************************************************/
/*******************
* Color V1.0.1    *
* by Thanos for   *
* Carpathia MUD   *
* kyndig.com 9501 *
*******************/

/* color.h */

/**********************************************************
 *           COLOR defines           Thanos               *
 **********************************************************/
/* this is the character that precedes all color commands */
#define COLOR_CHAR      '{'

/* list customizeable channels etc here and in custom_colors */
#define COLOR_SAY               0
#define COLOR_TELL              1
#define COLOR_IMM               2
#define COLOR_DAMAGE            3
#define COLOR_INFLICTED         4
/* prompt stuff */
#define COLOR_PROMPT            5
#define COLOR_HP                6
#define COLOR_MANA              7
#define COLOR_MOVES             8
#define COLOR_OOC               9
#define COLOR_IC                10
#define MAX_CUSTOM_COLORS       11

/* color flags */
#define RED             A
#define GREEN           B
#define YELLOW          C
#define BLUE            D
#define MAGENTA         E
#define CYAN            F
#define GRAY            G
#define D_GRAY          H
#define B_RED           I
#define B_GREEN         J
#define B_YELLOW        K
#define B_BLUE          L
#define B_MAGENTA       M
#define B_CYAN          N
#define WHITE           O
#define DEFAULT_COLOR   P
#define END_COLOR       Q


/* Color structures */

struct color_type
{
   char        *color;
   char        *letter;
   long        flag;
   int         bright;
   int         code;
   bool        visible;
};

struct custom_color_type
{
   char        *position;
   char        *letter;
   long        default_color;
   int         level;
};

/* color functions */
int get_color( long flag );
int color_lookup( const char *name );
int color( CHAR_DATA *ch, char letter, char *buffer );
void color_convert( CHAR_DATA *ch, const char *text, char *buffer );
void reset_colors( CHAR_DATA *ch );
int strip_ansii( const char *txt, char *buffer );
void save_char_color( CHAR_DATA *ch, FILE *fp );
void load_char_colors( CHAR_DATA *ch, FILE *fp );

/* color tables */
extern const struct color_type color_table[];
extern const struct custom_color_type custom_colors[MAX_CUSTOM_COLORS];