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