-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresent.h
66 lines (60 loc) · 1.02 KB
/
present.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
typedef struct Canvas Canvas;
typedef struct Sprite Sprite;
typedef struct Text Text;
struct Dormer
{
void *dis;
void *win;
int ev;
int key;
int btn;
float x, y;
int width;
int height;
int cursor;
Canvas *c;
};
extern struct Dormer dm;
struct Canvas
{
int si;
Sprite *sv;
float *vert;
float *tex;
int tid;
int va, vb, ib, tb;
short *data;
int w, h;
};
struct Sprite
{
Canvas *c;
int ind;
char *label;
float *vert;
int tnum;
int rnum;
int tile;
float x,y;
float *tex;
float w, h;
float *first;
};
enum
{
Chide, Carrow, Ccross,
Cload, Ctext, Chand,
Cno, Chelp, Cmove
};
extern void winit(char *label);
extern void readev(void);
extern void setcurs(int curs);
extern int usec(void);
extern int closed(void);
extern void present(void);
extern Canvas *canvas(char *path);
extern void freecanvas(Canvas *c);
extern void mkprog();
extern Sprite *sprite(Canvas *c, char *label);
extern void transprite(Sprite *s, float x, float y, float sx, float sy, float a);
extern void setsprite(Sprite *s, int row, int tile);