From: Matthias Braun Date: Sat, 26 May 2007 16:43:52 +0000 (+0000) Subject: you can compare colors now X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5e0bb78e0d7679399eb0f687ecaf93a91cfcb577;p=supertux.git you can compare colors now SVN-Revision: 5028 --- diff --git a/src/video/color.hpp b/src/video/color.hpp index 391c929d4..e94b362d0 100644 --- a/src/video/color.hpp +++ b/src/video/color.hpp @@ -52,6 +52,12 @@ public: #endif } + bool operator==(const Color& other) const + { + return red == other.red && green == other.green && blue == other.blue + && alpha == other.alpha; + } + void check_color_ranges() { if(red < 0 || red > 1.0 || green < 0 || green > 1.0