From 08c646bb929c7bc98b005521b6e0c14428f651d0 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 28 Feb 2013 21:26:09 +0100 Subject: Fixed stupid error, tweaked ambient light colors * fixed stupid error in light manager * tweaked ambient light colors to 0.1 of diffuse; colors should not be oversaturated now --- src/graphics/core/color.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/graphics/core') diff --git a/src/graphics/core/color.h b/src/graphics/core/color.h index 7cbd175..5d059e5 100644 --- a/src/graphics/core/color.h +++ b/src/graphics/core/color.h @@ -76,6 +76,16 @@ struct Color { return ! this->operator==(other); } + + inline Color operator*(float scale) const + { + Color c = *this; + c.r *= scale; + c.g *= scale; + c.b *= scale; + c.a *= scale; + return c; + } }; /** -- cgit v1.2.3-1-g7c22