summaryrefslogtreecommitdiff
path: root/src/resources/dye.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 21:59:21 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 22:00:09 +0100
commit99e8a3fd77b63a029fe02dcf771b6af1aad252ed (patch)
tree03c296d1f89859aae35336dfe2f58df09d256fd3 /src/resources/dye.cpp
parentfa8a4bf49100c0a1d5b96e00803f43bbbb861100 (diff)
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadMana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.gz
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.bz2
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.xz
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.zip
Merge branch 'aethyra/master'
Conflicts: Many files.
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 22bd2411..1e4fd2fd 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -25,7 +25,7 @@
#include "../log.h"
-Palette::Palette(const std::string &description)
+DyePalette::DyePalette(const std::string &description)
{
int size = description.length();
if (size == 0) return;
@@ -62,7 +62,7 @@ Palette::Palette(const std::string &description)
logger->log("Error, invalid embedded palette: %s", description.c_str());
}
-void Palette::getColor(int intensity, int color[3]) const
+void DyePalette::getColor(int intensity, int color[3]) const
{
if (intensity == 0)
{
@@ -111,7 +111,7 @@ void Palette::getColor(int intensity, int color[3]) const
Dye::Dye(const std::string &description)
{
for (int i = 0; i < 7; ++i)
- mPalettes[i] = 0;
+ mDyePalettes[i] = 0;
if (description.empty()) return;
@@ -141,7 +141,7 @@ Dye::Dye(const std::string &description)
logger->log("Error, invalid dye: %s", description.c_str());
return;
}
- mPalettes[i] = new Palette(description.substr(pos + 2, next_pos - pos - 2));
+ mDyePalettes[i] = new DyePalette(description.substr(pos + 2, next_pos - pos - 2));
++next_pos;
}
while (next_pos < length);
@@ -150,7 +150,7 @@ Dye::Dye(const std::string &description)
Dye::~Dye()
{
for (int i = 0; i < 7; ++i)
- delete mPalettes[i];
+ delete mDyePalettes[i];
}
void Dye::update(int color[3]) const
@@ -170,8 +170,8 @@ void Dye::update(int color[3]) const
int i = (color[0] != 0) | ((color[1] != 0) << 1) | ((color[2] != 0) << 2);
- if (mPalettes[i - 1])
- mPalettes[i - 1]->getColor(cmax, color);
+ if (mDyePalettes[i - 1])
+ mDyePalettes[i - 1]->getColor(cmax, color);
}
void Dye::instantiate(std::string &target, const std::string &palettes)