aboutsummaryrefslogtreecommitdiff
path: root/render.h
blob: ca06ca3bd7de292bd404af5f036b7c53bb0f394b (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef render_h
#define render_h

struct Rect;

typedef struct Bitmap {
	short w, h;
} Bitmap;

typedef struct Renderer {
	unsigned* t;
	int w, h;
	int clip[4];
} Renderer;

void ren_begin(Renderer* r, unsigned* t, int w, int h);
void ren_end(Renderer* r);
void ren_clip(Renderer* r, const struct Rect* re);
void ren_rclip(Renderer* r);
void ren_clear(Renderer* r);
void ren_char(Renderer* r, int x, int y, char ch);
void ren_text(Renderer* r, int x, int y, const char* t);
void ren_map(
	Renderer* r,
	int x,
	int y,
	const struct Rect* re,
	const Bitmap* bm
);
void ren_cmap(
	Renderer* r,
	int x,
	int y,
	const struct Rect* re,
	const Bitmap* bm
);
void ren_rect(
	Renderer* r,
	const struct Rect* re
);

#endif