]> 4ch.mooo.com Git - 16.git/blobdiff - 16/modex16/bitmap.h
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / modex16 / bitmap.h
diff --git a/16/modex16/bitmap.h b/16/modex16/bitmap.h
new file mode 100755 (executable)
index 0000000..4c4af98
--- /dev/null
@@ -0,0 +1,24 @@
+/*\r
+ * Functions and types for loading and manipulating bitmaps.\r
+ */\r
+#ifndef BITMAP_H\r
+#define BITMAP_H\r
+#include "types.h"\r
+typedef struct {\r
+    byte *data;\r
+    word width;\r
+    word height;\r
+    byte *palette;\r
+} bitmap_t;\r
+\r
+typedef struct {\r
+    byte **data;\r
+    word ntiles;   /* the number of tiles */\r
+    word twidth;   /* width of the tiles */\r
+    word theight;  /* height of the tiles */\r
+    byte *palette; /* palette for the tile set */\r
+} tileset_t;\r
+\r
+bitmap_t bitmapLoadPcx(char *filename);\r
+tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight);\r
+#endif\r