diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-02-28 21:26:09 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-02-28 22:06:22 +0100 |
commit | 08c646bb929c7bc98b005521b6e0c14428f651d0 (patch) | |
tree | bd708ad596274bea8c387122bcd9fceadf620373 /src/graphics/core | |
parent | b361d27d332591c59b5f8613fbf724d82872b877 (diff) | |
download | colobot-08c646bb929c7bc98b005521b6e0c14428f651d0.tar.gz colobot-08c646bb929c7bc98b005521b6e0c14428f651d0.tar.bz2 colobot-08c646bb929c7bc98b005521b6e0c14428f651d0.zip |
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
Diffstat (limited to 'src/graphics/core')
-rw-r--r-- | src/graphics/core/color.h | 10 |
1 files changed, 10 insertions, 0 deletions
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; + } }; /** |