summaryrefslogtreecommitdiff
path: root/src/resources/dye.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-03 17:26:04 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-03 17:26:04 +0300
commit57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534 (patch)
tree4677cd003c75753536dd90b864959b0982ca42d7 /src/resources/dye.h
parenta1e8fc08282d11b0132670cf1bfde2b7fe989dc2 (diff)
downloadplus-57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534.tar.gz
plus-57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534.tar.bz2
plus-57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534.tar.xz
plus-57a81ed6cf1c02d7ec8bfe1e6f0a1d3232309534.zip
Improve dye speed.
Diffstat (limited to 'src/resources/dye.h')
-rw-r--r--src/resources/dye.h16
1 files changed, 15 insertions, 1 deletions
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 <string>
#include <vector>
+#include <SDL_stdinc.h>
+
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:
/**