21 lines
452 B
C
21 lines
452 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <alloc.h>
|
|
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
|
|
#define RED 0
|
|
#define GREEN 1
|
|
#define BLUE 2
|
|
|
|
#define MAXCOLORS 255
|
|
|
|
typedef unsigned char UCHAR; /* 8 bits */
|
|
typedef unsigned short int UINT; /* 16 bits */
|
|
typedef unsigned long int ULONG; /* 32 bits */
|
|
|
|
extern UCHAR palette[MAXCOLORS][3];
|
|
int pal_index(UCHAR *pixel);
|
|
|