summaryrefslogtreecommitdiff
path: root/dblbuf.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2006-10-03 01:37:17 +0000
committerRich Felker <dalias@aerifal.cx>2006-10-03 01:37:17 +0000
commit0fe28fd69dd15006ccd684d563699420aadde61a (patch)
tree77a419dc56462f39c975b6c043a7bf344fc3f3e6 /dblbuf.h
downloaduuterm-0fe28fd69dd15006ccd684d563699420aadde61a.tar.gz
first working version of uuterm!
- at this point it is purely experimental. only ascii characters are visible (using builtin font) although all characters are processed. - there are known bugs, including crashes. - there are major missing features. - but it works. ^_^
Diffstat (limited to 'dblbuf.h')
-rw-r--r--dblbuf.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/dblbuf.h b/dblbuf.h
new file mode 100644
index 0000000..aa2dc47
--- /dev/null
+++ b/dblbuf.h
@@ -0,0 +1,29 @@
+
+
+
+struct slice
+{
+ int y;
+ unsigned char *colors;
+ unsigned char *bitmap;
+};
+
+struct dblbuf
+{
+ struct slice *slices;
+ unsigned cs, ch;
+
+ unsigned curs_x;
+ unsigned curs_y;
+
+ unsigned char *vidmem;
+ unsigned row_stride;
+ unsigned line_stride;
+ unsigned bytes_per_pixel;
+};
+
+#define SLICE_BUF_SIZE(w, h, cs, ch) \
+ ( (h)*(sizeof(struct slice) + (w)*(1 + (cs)*(ch))) )
+
+struct slice *dblbuf_setup_buf(int, int, int, int, unsigned char *);
+