1 /* aNetHack 0.0.1 tileset.h $ANH-Date: 1457207052 2016/03/05 19:44:12 $ $ANH-Branch: master $:$ANH-Revision: 1.0 $ */
2 /* Copyright (c) Ray Chason, 2016. */
3 /* aNetHack may be freely redistributed. See license for details. */
9 unsigned char r
, g
, b
, a
;
14 unsigned width
, height
;
15 struct Pixel
*pixels
; /* for direct color */
16 unsigned char *indexes
; /* for paletted images */
19 boolean
FDECL(read_tiles
, (const char *filename
, BOOLEAN_P true_color
));
20 const struct Pixel
*NDECL(get_palette
);
21 void NDECL(free_tiles
);
22 const struct TileImage
*FDECL(get_tile
, (unsigned tile_index
));
24 /* Used internally by the tile set code */
27 unsigned width
, height
;
28 struct Pixel
*pixels
; /* for direct color */
29 unsigned char *indexes
; /* for paletted images */
30 struct Pixel palette
[256];
32 /* Image description from the file */
36 unsigned tile_width
, tile_height
;
39 boolean
FDECL(read_bmp_tiles
, (const char *filename
, struct TileSetImage
*image
));
40 boolean
FDECL(read_gif_tiles
, (const char *filename
, struct TileSetImage
*image
));
41 boolean
FDECL(read_png_tiles
, (const char *filename
, struct TileSetImage
*image
));