Optimized gradient when top color is the same as the bottom one.
[supertux.git] / src / screen / screen.h
index 4c7f3df..2383573 100644 (file)
 #ifndef NOOPENGL
 #include <SDL_opengl.h>
 #endif
+#include <iostream>
+class Color
+{
+public:
+  Color() 
+    : red(0), green(0), blue(0), alpha(0)
+  {}
+  
+  Color(Uint8 red_, Uint8 green_, Uint8 blue_, Uint8 alpha_ = 0)
+    : red(red_), green(green_), blue(blue_), alpha(alpha_)
+  {}
+
+  Color(const Color& o)
+    : red(o.red), green(o.green), blue(o.blue), alpha(o.alpha)
+  { }
+
+  bool operator==(const Color& o)
+    {  if(red == o.red && green == o.green &&
+          blue == o.blue && alpha == o.alpha)
+         return true;
+       return false;  }
+
+  Uint8 red, green, blue, alpha;
+};
+
 #include "texture.h"
 
 class Vector;