summaryrefslogblamecommitdiff
path: root/dblbuf.h
blob: cb57696cfb4a1b12e2d2c0aa70e8a6203fc5e2bb (plain) (tree)
1
2
3
4
5
6
7





              
                              

















                                      
                                                                         


                                                                    



struct slice
{
	int y;
	unsigned long *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)*(2*sizeof(long) + (cs)*(ch))) )

struct slice *dblbuf_setup_buf(int, int, int, int, unsigned char *);