00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DYE_H
00023 #define DYE_H
00024
00025 #include <string>
00026 #include <vector>
00027
00031 class DyePalette
00032 {
00033 public:
00034
00040 DyePalette(const std::string &pallete);
00041
00045 void getColor(int intensity, int color[3]) const;
00046
00047 private:
00048
00049 struct Color { unsigned char value[3]; };
00050
00051 std::vector< Color > mColors;
00052 };
00053
00057 class Dye
00058 {
00059 public:
00060
00067 Dye(const std::string &dye);
00068
00072 ~Dye();
00073
00077 void update(int color[3]) const;
00078
00082 static void instantiate(std::string &target,
00083 const std::string &palettes);
00084
00085 private:
00086
00092 DyePalette *mDyePalettes[7];
00093 };
00094
00095 #endif