Optimized gradient when top color is the same as the bottom one.
[supertux.git] / src / screen / screen.h
index 85744e8..2383573 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef NOOPENGL
 #include <SDL_opengl.h>
 #endif
-
+#include <iostream>
 class Color
 {
 public:
@@ -40,6 +40,12 @@ public:
     : 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;
 };