aboutsummaryrefslogtreecommitdiff
path: root/render.h
blob: 01391c582c281f6cd6b68165380a4d9f601e97e0 (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 {
	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