diff options
Diffstat (limited to 'dblbuf.h')
-rw-r--r-- | dblbuf.h | 29 |
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 *); + |