#ifndef TXD_H #define TXD_H unsigned char **palette; unsigned char **pixel; unsigned char *indices; struct bmp_header { char id[2]; /* usually 'BM' */ int size; /* size of file in bytes */ int reserved; /* set them to zero */ int offset; /* offset of pixeldata */ } __attribute__((packed)); struct bmp_infoheader { int size; /* usually 0x28 */ int width; int height; short planes; /* must be 1 */ short bpp; /* bits per pixel: 1, 2, 4, 8, 16, 24, 32 */ int compression; /* set it to zero for no compression */ int imagesize; /* number of bytes used in image data (not palette) */ int xresolution, yresolution; /* not used */ int ncolors; /* Size of Palette in this case */ int impcolors; /* Set it to 0 */ } __attribute__((packed)); #endif