Source:NetHack 3.4.3/include/tile.h

From NetHackWiki
(Redirected from Tile.h)
Jump to navigation Jump to search

Below is the full text to win/share/tile.h from NetHack 3.4.3. To link to a particular line, write [[tile.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

typedef unsigned char pixval;

typedef struct {
pixval r, g, b;
} pixel;

#define MAXCOLORMAPSIZE		256

#define CM_RED          0
#define CM_GREEN	1
#define CM_BLUE		2

/* shared between reader and writer */
extern pixval ColorMap[3][MAXCOLORMAPSIZE];
extern int colorsinmap;
/* writer's accumulated colormap */
extern pixval MainColorMap[3][MAXCOLORMAPSIZE];
extern int colorsinmainmap;

#include "dlb.h"        /* for MODEs */

/* size of tiles */
#ifndef TILE_X
#define TILE_X 16
#endif
#ifndef TILE_Y
#define TILE_Y 16
#endif

#define Fprintf (void) fprintf


extern boolean FDECL(fopen_text_file, (const char *, const char *));
extern boolean FDECL(read_text_tile, (pixel (*)[TILE_X]));
extern boolean FDECL(write_text_tile, (pixel (*)[TILE_X]));
extern int NDECL(fclose_text_file);

extern void NDECL(init_colormap);
extern void NDECL(merge_colormap);

#if defined(MICRO) || defined(WIN32)
#undef exit
# if !defined(MSDOS) && !defined(WIN32)
extern void FDECL(exit, (int));
# endif
#endif