From ebde46bc82bebf478db67abef5b7dc88c014706b Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 3 Jan 2017 00:30:28 -0600 Subject: 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/ --- src/graphics.h | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) (limited to 'src/graphics.h') 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 +//#include //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 -- cgit v1.2.3