/*******************************************/
/*                                         */
/* colors.h                                */
/*                                         */
/* scol colors primitives                  */
/*                                         */
/* Loïc Berthelot, CryoNetworks, june 2002 */
/*                                         */
/*******************************************/




#ifndef _COLORS_H_
#define _COLORS_H_

#define COLOR_NB_MODE 6


#define COLOR_8       0x00
#define COLOR_RGB16   0x01
#define COLOR_RGB24   0x02
#define COLOR_BGR16   0x03
#define COLOR_BGR24   0x04


#ifdef __cplusplus
extern "C" {
#endif

int _COLOR_BGR_TO_I (unsigned char b, unsigned char g, unsigned char r);

int _COLOR_BGR_TO_I15 (unsigned char b, unsigned char g, unsigned char r);

void _COLOR_I_TO_BGR (int color, unsigned char *b, unsigned char *g, unsigned char *r);
void _COLOR_I16_TO_BGR (int color, unsigned char *b, unsigned char *g, unsigned char *r);


int _COLOR_CONVERT_16_24 (mmachine m, int value);

int SCOLloadCOLORS(mmachine m);

#ifdef __cplusplus
}
#endif



#endif

