]> 4ch.mooo.com Git - 16.git/blob - src/lib/bitmap.h
17bb0d94ae189de14e921d60f83792bb2849ba22
[16.git] / src / lib / bitmap.h
1 /*\r
2  * Functions and types for loading and manipulating bitmaps.\r
3  */\r
4 #ifndef BITMAP_H\r
5 #define BITMAP_H
6 #include <malloc.h>\r
7 #include "src/lib/types.h"\r
8 typedef struct {\r
9     byte *data;
10     word width;\r
11     word height;\r
12     byte *palette;
13     word offset;
14 } bitmap_t;\r
15 \r
16 typedef struct {\r
17     byte **data;\r
18     word ntiles;   /* the number of tiles */\r
19     word twidth;   /* width of the tiles */\r
20     word theight;  /* height of the tiles */\r
21     byte *palette; /* palette for the tile set */\r
22 } tileset_t;\r
23 \r
24 bitmap_t bitmapLoadPcx(char *filename);\r
25 tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight);\r
26 #endif\r