summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-03-19 04:51:01 -0500
committerepoch <epoch@hacking.allowed.org>2017-03-19 04:51:01 -0500
commit781ecd6529505e4bf1fd400634ee83bcb9a07c81 (patch)
treea5f51756d54dff5ebb47f5435198e1db15ce345d /src/common.h
parent17347b2e23292aad11c879d3df4a0e73c31e2ae8 (diff)
downloadhackvr-781ecd6529505e4bf1fd400634ee83bcb9a07c81.tar.gz
hackvr-781ecd6529505e4bf1fd400634ee83bcb9a07c81.zip
I have no idea why I am doing this...
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/common.h b/src/common.h
index 859c826..bdabb4f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,9 +1,15 @@
#include "config.h"
+#include "math.h"
#ifndef _HACKVR_COMMON_H_
#include <X11/Xlib.h>
#define _HACKVR_COMMON_H_
+#define TOP 240.0
+#define BOTTOM -240.0
+#define RIGHT 320.0
+#define LEFT -320.0
+
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
@@ -33,17 +39,17 @@ typedef struct {
short y;
} cs_t;
-typedef struct c3_rotation {
+typedef struct {
degrees x;
degrees y;
degrees z;
} c3_rot_t;
-struct camera {
- c3_t p;
+typedef struct {
+ char *id;
c3_rot_t r;
- real zoom;
-} camera;
+ c3_t p;
+} c3_group_rot_t;
typedef struct c3_line {
char *id;
@@ -80,6 +86,9 @@ struct global {
real mmz;
struct c3_shape *shape[SHAPES];
int shapes;
+ c3_group_rot_t *group_rot[256];//meh
+ c3_group_rot_t camera;
+ real zoom;
int derp;
real split;
};