OSDN Git Service

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