X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fmodex16%2Fbitmap.h;fp=16%2Fmodex16%2Fbitmap.h;h=4c4af98eb04e2cb87502a704cc08966c75b6e712;hb=7b204788231612250d286ca317dd942b78da91b6;hp=0000000000000000000000000000000000000000;hpb=6c98a0c193de37421dabbe746a0b699020b5c8af;p=16.git diff --git a/16/modex16/bitmap.h b/16/modex16/bitmap.h new file mode 100755 index 00000000..4c4af98e --- /dev/null +++ b/16/modex16/bitmap.h @@ -0,0 +1,24 @@ +/* + * Functions and types for loading and manipulating bitmaps. + */ +#ifndef BITMAP_H +#define BITMAP_H +#include "types.h" +typedef struct { + byte *data; + word width; + word height; + byte *palette; +} bitmap_t; + +typedef struct { + byte **data; + word ntiles; /* the number of tiles */ + word twidth; /* width of the tiles */ + word theight; /* height of the tiles */ + byte *palette; /* palette for the tile set */ +} tileset_t; + +bitmap_t bitmapLoadPcx(char *filename); +tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight); +#endif