aboutsummaryrefslogtreecommitdiff
path: root/src/xbm.h
diff options
context:
space:
mode:
authorFrançois Cartegnie <281376+fcartegnie@users.noreply.github.com>2024-06-11 11:29:21 +0700
committerGitHub <noreply@github.com>2024-06-11 11:29:21 +0700
commit1ae34de744aac664df8780365a549ea31c57ec13 (patch)
tree2cef86d7bb4e057a40c1d39c909910f96bc68056 /src/xbm.h
parent0d4a46593ce616f8a7a9eb93648b279f5dbee70d (diff)
parent8815700322c0c10cb0528b047b2c7604c2eeb053 (diff)
Merge pull request #13 from kienvo/xbm-support
Add support for .xbm bitmap file
Diffstat (limited to 'src/xbm.h')
-rw-r--r--src/xbm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/xbm.h b/src/xbm.h
new file mode 100644
index 0000000..b3f2c52
--- /dev/null
+++ b/src/xbm.h
@@ -0,0 +1,18 @@
+#ifndef __XBM_H__
+#define __XBM_H__
+
+#include <stdint.h>
+
+typedef struct {
+ uint8_t *bits;
+ int w; // Width
+ int h; // Height
+ int fh; // Frame height
+} xbm_t;
+
+void xbm2fb(xbm_t *xbm, uint16_t *fb, int col, int row);
+void xbm2fb_dirty(xbm_t *xbm, uint16_t *fb, int col, int row);
+xbm_t *xbm_croph(xbm_t *xbm, xbm_t *frame, int from_row, int to_row);
+xbm_t *extract_frame(xbm_t *xbm, xbm_t *frame, int frame_index);
+
+#endif /* __XBM_H__ */