From e11249023c8945fb817469b3b4362dcd8c2fd9f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Mar 2012 03:22:25 +0300 Subject: Add new dye mode S. It simple colors replace dye method. Dye palate should be in format: source1,destination1,source2,destination2 etc --- src/resources/dye.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/resources/dye.h') diff --git a/src/resources/dye.h b/src/resources/dye.h index 94bee3b58..34afcf8ed 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -26,6 +26,8 @@ #include #include +const int dyePalateSize = 8; + /** * Class for performing a linear interpolation between colors. */ @@ -57,11 +59,13 @@ class DyePalette */ void getColor(double intensity, int color[3]) const; - private: + void replaceColor(int color[3]) const; - struct Color { unsigned char value[3]; }; + private: + struct Color + { unsigned char value[3]; }; - std::vector< Color > mColors; + std::vector mColors; }; /** @@ -100,9 +104,9 @@ class Dye /** * The order of the palettes, as well as their uppercase letter, is: * - * Red, Green, Yellow, Blue, Magenta, White (or rather gray). + * Red, Green, Yellow, Blue, Magenta, White (or rather gray), Simple. */ - DyePalette *mDyePalettes[7]; + DyePalette *mDyePalettes[dyePalateSize]; }; #endif -- cgit v1.2.3-60-g2f50