summaryrefslogtreecommitdiff
path: root/src/resources/dye.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-09 03:22:25 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-09 03:22:25 +0300
commite11249023c8945fb817469b3b4362dcd8c2fd9f0 (patch)
treefcb062710863e27321475dfc029b79976786097c /src/resources/dye.h
parent117a35dc9450a134038818a925168de757fb3136 (diff)
downloadManaVerse-e11249023c8945fb817469b3b4362dcd8c2fd9f0.tar.gz
ManaVerse-e11249023c8945fb817469b3b4362dcd8c2fd9f0.tar.bz2
ManaVerse-e11249023c8945fb817469b3b4362dcd8c2fd9f0.tar.xz
ManaVerse-e11249023c8945fb817469b3b4362dcd8c2fd9f0.zip
Add new dye mode S.
It simple colors replace dye method. Dye palate should be in format: source1,destination1,source2,destination2 etc
Diffstat (limited to 'src/resources/dye.h')
-rw-r--r--src/resources/dye.h14
1 files changed, 9 insertions, 5 deletions
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 <string>
#include <vector>
+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<Color> 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