X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=lib%2Fvideo%2Fscreen.h;h=93c0bfae7a0e1a0e1400c0a0b32856016e9e5be4;hb=4adec13cbf57960a4106b5140d52c14d0283eed3;hp=a1797fee36c8a1635eb49ecc1489836e4cc99bd8;hpb=edaacb3651cf0560314dd008d7243be4b3b2f8c6;p=supertux.git diff --git a/lib/video/screen.h b/lib/video/screen.h index a1797fee3..93c0bfae7 100644 --- a/lib/video/screen.h +++ b/lib/video/screen.h @@ -26,6 +26,8 @@ #endif #include +#include + namespace SuperTux { @@ -42,6 +44,11 @@ namespace SuperTux : red(red_), green(green_), blue(blue_), alpha(alpha_) {} + Color(std::vector color) + : red(0), green(0), blue(0), alpha(255) + { if(color.size() >= 3) { red = color[0]; green = color[1]; blue = color[2]; } + if(color.size() == 4) alpha = color[3]; } + Color(const Color& o) : red(o.red), green(o.green), blue(o.blue), alpha(o.alpha) { }