summaryrefslogtreecommitdiff
path: root/src/graphics.h
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-01-03 00:30:28 -0600
committerepoch <epoch@hacking.allowed.org>2017-01-03 00:30:28 -0600
commitebde46bc82bebf478db67abef5b7dc88c014706b (patch)
tree77121f0c18b1845b8c3cfdfec962e9c5b2ec7e67 /src/graphics.h
parentf7353ec277198b295c6c842a4a4a07b403b2a572 (diff)
downloadhackvr-ebde46bc82bebf478db67abef5b7dc88c014706b.tar.gz
hackvr-ebde46bc82bebf478db67abef5b7dc88c014706b.zip
lots and lots of shit. opengl shit is barely worked on. new pl script to obj2hackvr using more than just triangles.http://hackaday.com/blog/http://hackaday.com/blog/
Diffstat (limited to 'src/graphics.h')
-rw-r--r--src/graphics.h48
1 files changed, 44 insertions, 4 deletions
diff --git a/src/graphics.h b/src/graphics.h
index ff17b9a..6f28d1e 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -1,11 +1,51 @@
#ifndef _HACKVR_GRAPHICS_H_
#define _HACKVR_GRAPHICS_H_
-#include <X11/Xlib.h>
+//#include <X11/Xlib.h>//this should be in the x11 one, not this one.
-int x11_init();
-int x11_event_handler();
-void draw_screen(Display *dpy,Window w,GC gc);
+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);
+
+
+int compar(zsort_t *a,zsort_t *b);
#endif