From a6d17db5bc1bd3e4e49463b604078e88656ad3c4 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 19 Dec 2017 04:37:07 -0600 Subject: added color, luminosity, and shape flavor to each shape struct. added a beep flag to global. --- src/common.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3