aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.h
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-01-25 08:46:49 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-01-25 08:46:49 -0500
commit70eaac72ef917784cba10184a1df7c25d179d541 (patch)
treeeeaccf047e920f8e127799ce0db9699ce10daa1f /include/common.h
parent9c3e9dccdbb5804b47a3ecd5ca50ca3d424dab21 (diff)
Menus!
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/common.h b/include/common.h
index 8e08d1d..d0f539b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -61,6 +61,8 @@ typedef struct {
float z;
} vec3;
+typedef vec2 dim2;
+
/**
* This structure contains two sets of coordinates for ray drawing.
*/
@@ -70,11 +72,25 @@ typedef struct {
vec2 end;
} Ray;
-typedef struct{
+struct col{
float red;
float green;
float blue;
-} Color;
+ col operator-=(float a){
+ red-=a;
+ green-=a;
+ blue-=a;
+ return *this;
+ }
+ col operator+=(float a){
+ return{red+a,green+a,blue+a};
+ }
+ col operator=(float a){
+ return{red=a,green=a,blue=a};
+ }
+};
+
+typedef col Color;
#include <Texture.h>