]> 4ch.mooo.com Git - 16.git/blob - src/lib/bitmap.h
21009dcc3f986f78f693881cdbd197714c2d6dec
[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 far *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 far **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