summaryrefslogtreecommitdiff
path: root/src/graphics.h
blob: b351d2ca6ca635f69ec92f75fd7b5ebb1f0fcac3 (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
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _HACKVR_GRAPHICS_H_
#define _HACKVR_GRAPHICS_H_

//#include <X11/Xlib.h>//this should be in the x11 one, not this one.

struct gra_global {
  unsigned int width;
  unsigned int height;
  int mousex;
  int mousey;
  int greyscale;
  int xoff;
  int split_screen;
  int split;
  int split_flip;
  char force_redraw;
  char red_and_blue;
  unsigned int depth;//???
  unsigned int border_width;
  int oldtime;
  int fps;
  int oldfps;
  char zsort;
  char drawminimap;
  char drawsky;
  char draw3d;
  int mapxoff;
  int mapyoff;
  int rmousex;
  int rmousey;
  int buttonpressed;
};

typedef struct {
 struct c3_shape *s;
 real d;
} zsort_t;

int graphics_init();
int graphics_event_handler();
void draw_screen();
void set_aspect_ratio();
int selfcommand(char *s);
cs_t c3_to_cs(c3_t p);
real d2r(int d);
real shitdist(struct c3_shape *s,c3_t p);
c3_t rotate_c3_xr(c3_t p1,c3_t p2,real xr);
c3_t rotate_c3_yr(c3_t p1,c3_t p2,real yr);
c3_t rotate_c3_zr(c3_t p1,c3_t p2,real zr);
real points_to_angle(c2_t p1,c2_t p2);

int compar(zsort_t *a,zsort_t *b);

#endif