summaryrefslogtreecommitdiff
path: root/tools/dyecmd/src/dye.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dyecmd/src/dye.h')
-rwxr-xr-x[-rw-r--r--]tools/dyecmd/src/dye.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/dyecmd/src/dye.h b/tools/dyecmd/src/dye.h
index 5a8fe1b5..922f3370 100644..100755
--- a/tools/dyecmd/src/dye.h
+++ b/tools/dyecmd/src/dye.h
@@ -45,11 +45,19 @@ class Palette
*/
void getColor(int intensity, int color[3]) const;
+ /**
+ * Tells if the palette was successfully loaded.
+ */
+ bool loaded() const
+ { return mLoaded; }
+
private:
struct Color { unsigned char value[3]; };
std::vector< Color > mColors;
+
+ bool mLoaded;
};
/**
@@ -73,15 +81,15 @@ class Dye
~Dye();
/**
- * Modifies a pixel color.
+ * Tells if the dye description was successfully loaded.
*/
- void update(int color[3]) const;
+ bool loaded() const
+ { return mLoaded; }
/**
- * Fills the blank in a dye placeholder with some palette names.
+ * Modifies a pixel color.
*/
- static void instantiate(std::string &target,
- const std::string &palettes);
+ void update(int color[3]) const;
private:
@@ -91,6 +99,7 @@ class Dye
* Red, Green, Yellow, Blue, Magenta, White (or rather gray).
*/
Palette *mPalettes[7];
+ bool mLoaded;
};
#endif