summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/dye.cpp14
-rw-r--r--src/resources/dye.h4
2 files changed, 1 insertions, 17 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index c0120bad..e7c9be56 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -60,7 +60,7 @@ DyePalette::DyePalette(const std::string &description)
v = (v << 4) | n;
}
- Color c = { { v >> 16, v >> 8, v } };
+ Color c = { { (unsigned char) (v >> 16), (unsigned char) (v >> 8), (unsigned char) v } };
mColors.push_back(c);
pos += 6;
@@ -76,18 +76,6 @@ DyePalette::DyePalette(const std::string &description)
logger->log("Error, invalid embedded palette: %s", description.c_str());
}
-void DyePalette::addFirstColor(const int color[3])
-{
- Color c = { {color[0], color[1], color[2]} };
- mColors.insert(mColors.begin(), c);
-}
-
-void DyePalette::addLastColor(const int color[3])
-{
- Color c = { {color[0], color[1], color[2]} };
- mColors.push_back(c);
-}
-
void DyePalette::getColor(int intensity, int color[3]) const
{
if (intensity == 0)
diff --git a/src/resources/dye.h b/src/resources/dye.h
index e05f2d5e..3f964ea7 100644
--- a/src/resources/dye.h
+++ b/src/resources/dye.h
@@ -39,10 +39,6 @@ class DyePalette
*/
DyePalette(const std::string &pallete);
- void addFirstColor(const int color[3]);
-
- void addLastColor(const int color[3]);
-
/**
* Gets a pixel color depending on its intensity. First color is
* implicitly black (0, 0, 0).