summaryrefslogtreecommitdiff
path: root/dblbuf.h
blob: 7f1f8b7b48ac047c8894f54acf751c3320362eab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30



struct slice
{
	int y;
	unsigned long *colors;
	unsigned char *bitmap;
};

struct dblbuf
{
	struct slice *slices;
	unsigned cs, ch;

	int active, repaint;
	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 *);