]> 4ch.mooo.com Git - 16.git/blob - 16/modex16/bitmap.h
5ba53c818e7c83e09e4065024ede4884ccd09ee7
[16.git] / 16 / modex16 / 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\r
6 #include "types.h"\r
7 typedef struct {\r
8         byte *data;\r
9         word width;\r
10         word height;\r
11         byte *palette;\r
12         word offset;\r
13 } bitmap_t;\r
14 /*\r
15 typedef struct {\r
16     byte *data;\r
17     word width;\r
18     word height;\r
19     byte *palette;\r
20 } bitmap_t;\r
21 */\r
22 \r
23 typedef struct {\r
24         byte far **data;\r
25         word ntiles;            // the number of tiles\r
26         word twidth;    // width of the tiles\r
27         word theight;   // height of the tiles\r
28         byte *palette;  // palette for the tile set\r
29 } tileset_t;\r
30 /*\r
31 typedef struct {\r
32     byte **data;\r
33     word ntiles;   // the number of tiles\r
34     word twidth;   // width of the tiles\r
35     word theight;  // height of the tiles\r
36     byte *palette; // palette for the tile set\r
37 } tileset_t;\r
38 */\r
39 \r
40 bitmap_t bitmapLoadPcx(char *filename);\r
41 tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight);\r
42 #endif\r