aboutsummaryrefslogtreecommitdiff
path: root/render.h
blob: 2cb54b83c178c713b3be807999e4a1271a169e61 (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
#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_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
);

#endif