summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-12-19 04:37:07 -0600
committerepoch <epoch@hacking.allowed.org>2017-12-19 04:37:07 -0600
commita6d17db5bc1bd3e4e49463b604078e88656ad3c4 (patch)
treedefa1e54cf176349690f1522741e0ac2cf48ce1c /src
parentffbc0225e35bedc11e277955e6e8bd422e46d3ce (diff)
downloadhackvr-a6d17db5bc1bd3e4e49463b604078e88656ad3c4.tar.gz
hackvr-a6d17db5bc1bd3e4e49463b604078e88656ad3c4.zip
added color, luminosity, and shape flavor to each shape struct. added a beep flag to global.
Diffstat (limited to 'src')
-rw-r--r--src/common.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 135fbc2..dc6ad08 100644
--- a/src/common.h
+++ b/src/common.h
@@ -57,27 +57,41 @@ typedef struct c3_line {
c3_t p2;
} cs_l_t;
+struct attrib {
+ char col;
+ char lum;
+};
+
+typedef enum shape_flavor {POLYGON,ELLIPTIC_ARC,CUBIC_BEZIER,QUAD_BEZIER} shape_flavor;
+
typedef struct cs_shape {
char *id;
+ shape_flavor type;
unsigned char len;
cs_t p[MAX_SIDES];
+ struct attrib attrib;
} cs_s_t;
typedef struct c2_shape {
char *id;
+ shape_flavor type;
unsigned char len;
c2_t p[MAX_SIDES];
+ struct attrib attrib;
} c2_s_t;
typedef struct c3_shape {//use array or linked list?
char *id;
+ shape_flavor type;
unsigned char len;
c3_t p[MAX_SIDES];
+ struct attrib attrib;
} c3_s_t;
struct global {
int x;
int y;
+ char beep;//1 or 0
int math_error;
char *user;
char headless;
@@ -86,7 +100,7 @@ struct global {
real mmz;
struct c3_shape *shape[SHAPES];
int shapes;
- c3_group_rot_t *group_rot[2000];//meh
+ c3_group_rot_t *group_rot[SHAPES];//there can be less of these.
c3_group_rot_t camera;
real zoom;
int derp;