From 0fe28fd69dd15006ccd684d563699420aadde61a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 3 Oct 2006 01:37:17 +0000 Subject: 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. ^_^ --- dblbuf.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dblbuf.h (limited to 'dblbuf.h') 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 *); + -- cgit v1.2.1