summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2019-08-03 07:46:19 -0500
committerepoch <epoch@hacking.allowed.org>2019-08-03 07:46:19 -0500
commit612f65d12428ed83c486505d1accac4a0954dcde (patch)
tree03306ed55cf1e6bcffa3e29df6921a835d14f117 /src
parent47197a54c42bc59c9caae2fecb78b48318e1e7b1 (diff)
downloadhackvr-612f65d12428ed83c486505d1accac4a0954dcde.tar.gz
hackvr-612f65d12428ed83c486505d1accac4a0954dcde.zip
added new redraw() which will work using libidc. also added an action on empty space of the mouse x and y
Diffstat (limited to 'src')
-rw-r--r--src/graphics_c3.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/graphics_c3.c b/src/graphics_c3.c
index 3013a82..38918ab 100644
--- a/src/graphics_c3.c
+++ b/src/graphics_c3.c
@@ -23,7 +23,7 @@
#define SKYW (WIDTH*5)
#define SKYH (HEIGHT/2)
-extern struct global global;
+extern struct hvr_global global;
struct gra_global gra_global;
#ifdef GRAPHICAL
@@ -459,6 +459,11 @@ void draw_screen() {
draw_c3_shape(*(zs[i].s));
//}
}
+ //we check here to see if the mouse button is still down
+ if(gra_global.mousemap[0]==-1) {
+ printf("%s action %f %f\n",global.user,gra_global.mouse.x,gra_global.mouse.y);
+ gra_global.mousemap[0]=0;
+ }
/*
if(gra_global.drawminimap == 1) {
set_color();
@@ -490,6 +495,13 @@ void draw_screen() {
flipscreen();
}
+void redraw() {//something is requesting a redraw.
+ if(gra_global.force_redraw == 0) {
+ gra_global.force_redraw=1;//this is to prevent drawing way too often.
+ write(gra_global.redraw[1],"redraw plzkthx!\n",16);
+ }
+}
+
int graphics_init() {
//some of these values set
global.zoom=25.0l;//I think if this is set to 1, then 1 3d unit is 1 2d unit?