summaryrefslogtreecommitdiff
path: root/src/resources/dye.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2011-06-03 11:19:20 -0600
committerJared Adams <jaxad0127@gmail.com>2011-06-03 12:08:26 -0600
commit3c0cb0e058324ee1d3116017f14387e9a6004442 (patch)
treeb9c00c3fdf1dff7e4c07bf4f8c83c2e7bc03c0f7 /src/resources/dye.cpp
parent894038adf52a3e2b42542239a147d6c1cc1ad204 (diff)
downloadmana-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.gz
mana-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.bz2
mana-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.xz
mana-3c0cb0e058324ee1d3116017f14387e9a6004442.zip
Replace SDL_types.h with cstdint
This required moving to C++0x, so it does that too, and fixes a few errors with that. Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp14
1 files changed, 1 insertions, 13 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)