summaryrefslogtreecommitdiff
path: root/src/resources
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
parent894038adf52a3e2b42542239a147d6c1cc1ad204 (diff)
downloadmana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.gz
mana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.bz2
mana-client-3c0cb0e058324ee1d3116017f14387e9a6004442.tar.xz
mana-client-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')
-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).