1typedef unsigned char pixval;
2
3typedef struct {
4    pixval r, g, b;
5} pixel;
6
7#define MAXCOLORMAPSIZE 	256
8
9#define CM_RED		0
10#define CM_GREEN	1
11#define CM_BLUE 	2
12
13/* shared between reader and writer */
14extern pixval ColorMap[3][MAXCOLORMAPSIZE];
15extern int colorsinmap;
16/* writer's accumulated colormap */
17extern pixval MainColorMap[3][MAXCOLORMAPSIZE];
18extern int colorsinmainmap;
19
20#include "dlb.h"	/* for MODEs */
21
22/* size of tiles */
23#ifndef TILE_X
24#define TILE_X 16
25#endif
26#ifndef TILE_Y
27#define TILE_Y 16
28#endif
29
30#define Fprintf (void) fprintf
31
32
33extern boolean FDECL(fopen_text_file, (const char *, const char *));
34extern boolean FDECL(read_text_tile, (pixel (*)[TILE_X]));
35extern boolean FDECL(write_text_tile, (pixel (*)[TILE_X]));
36extern int NDECL(fclose_text_file);
37
38extern void NDECL(init_colormap);
39extern void NDECL(merge_colormap);
40
41#if defined(MICRO) || defined(WIN32)
42#undef exit
43# if !defined(MSDOS) && !defined(WIN32)
44extern void FDECL(exit, (int));
45# endif
46#endif
47