From 57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 3 Jun 2012 17:26:04 +0300 Subject: Improve dye speed. --- src/resources/dye.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/resources/dye.h') diff --git a/src/resources/dye.h b/src/resources/dye.h index 34afcf8ed..03aec71cb 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -26,6 +26,8 @@ #include #include +#include + const int dyePalateSize = 8; /** @@ -59,7 +61,7 @@ class DyePalette */ void getColor(double intensity, int color[3]) const; - void replaceColor(int color[3]) const; + void replaceColor(Uint8 *color) const; private: struct Color @@ -99,6 +101,18 @@ class Dye static void instantiate(std::string &target, const std::string &palettes); + /** + * Check if dye is special dye (S) + */ + bool isSpecialDye() const + { return mDyePalettes[dyePalateSize - 1]; } + + /** + * Return special dye palete (S) + */ + DyePalette *getSPalete() const + { return mDyePalettes[dyePalateSize - 1]; } + private: /** -- cgit v1.2.3-60-g2f50