-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgr.h
45 lines (38 loc) · 992 Bytes
/
gr.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
#ifndef _GR_H
#define _GR_H 1
#include <SDL/SDL.h>
typedef struct {
int x1, y1, x2, y2;
} rect_t;
typedef enum {
PMD_FIRST = 0,
PMD_SET = 0,
PMD_XOR,
PMD_LAST,
} pixelmode_t;
int grSetSurface(SDL_Surface *s);
void grBegin();
void grEnd();
int (*grRGB)(int r, int g, int b);
void grPutPixel(int x, int y);
void grBar(int x1, int y1, int x2, int y2);
void grLine(int x1, int y1, int x2, int y2);
void grLineTo(int x, int y);
void grClear();
void grSetColor(int c);
#define grMoveTo(x, y) grSetPos(x, y)
void grSetPos(int x, int y);
void grPutChar(char ch);
void grPutStr(const char *s);
void grprintf(const char *s, ...);
void grOctagon(int x, int y, int a);
void grRectangle(int x1, int y1, int x2, int y2);
void grSetViewPort(int x1, int y1, int x2, int y2);
void grAlignMouse(int *mx, int *my);
void grSetPixelMode(pixelmode_t pm);
int grPushViewPort();
int grPopViewPort();
void grGetScreenDimensions(int *w, int *h);
int grGetMaxX();
int grGetMaxY();
#endif /* _GR_H */