summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-18 18:10:26 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-18 22:40:43 +0100
commit4159ba015c5f2035d188367d85d85052a7673cdc (patch)
tree1776e43ef3708dc094f747e64720dd41f1fa1f5b /src/resources
parente554d9b2be1ec2fcb15065ae70151302adeef602 (diff)
downloadmana-client-4159ba015c5f2035d188367d85d85052a7673cdc.tar.gz
mana-client-4159ba015c5f2035d188367d85d85052a7673cdc.tar.bz2
mana-client-4159ba015c5f2035d188367d85d85052a7673cdc.tar.xz
mana-client-4159ba015c5f2035d188367d85d85052a7673cdc.zip
ColorDB -> HairDB.
This will ease the reading of the next patch about hair handling at character creation time in tAthena. As requested by bjorn. Reviewed-by: bjorn
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/hairdb.cpp (renamed from src/resources/colordb.cpp)13
-rw-r--r--src/resources/hairdb.h (renamed from src/resources/colordb.h)11
2 files changed, 13 insertions, 11 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/hairdb.cpp
index d0b46b4e..abf64bd5 100644
--- a/src/resources/colordb.cpp
+++ b/src/resources/hairdb.cpp
@@ -1,6 +1,7 @@
/*
* Color database
* Copyright (C) 2008 Aethyra Development Team
+ * Copyright (C) 2009-2012 The Mana Developers
*
* This file is part of The Mana Client.
*
@@ -18,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "resources/colordb.h"
+#include "resources/hairdb.h"
#include "log.h"
@@ -28,12 +29,12 @@
namespace
{
- ColorDB::Colors mColors;
+ HairDB::Colors mColors;
bool mLoaded = false;
std::string mFail = "#ffffff";
}
-void ColorDB::load()
+void HairDB::load()
{
if (mLoaded)
unload();
@@ -84,7 +85,7 @@ void ColorDB::load()
mLoaded = true;
}
-void ColorDB::unload()
+void HairDB::unload()
{
logger->log("Unloading color database...");
@@ -92,7 +93,7 @@ void ColorDB::unload()
mLoaded = false;
}
-std::string &ColorDB::get(int id)
+std::string &HairDB::get(int id)
{
if (!mLoaded)
load();
@@ -110,7 +111,7 @@ std::string &ColorDB::get(int id)
}
}
-int ColorDB::size()
+int HairDB::size()
{
return mColors.size();
}
diff --git a/src/resources/colordb.h b/src/resources/hairdb.h
index 57b52388..c29dbb83 100644
--- a/src/resources/colordb.h
+++ b/src/resources/hairdb.h
@@ -1,6 +1,7 @@
/*
* Color database
* Copyright (C) 2008 Aethyra Development Team
+ * Copyright (C) 2009-2012 The Mana Developers
*
* This file is part of The Mana Client.
*
@@ -18,16 +19,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef COLOR_MANAGER_H
-#define COLOR_MANAGER_H
+#ifndef HAIR_MANAGER_H
+#define HAIR_MANAGER_H
#include <map>
#include <string>
/**
- * Color information database.
+ * Hair information database.
*/
-namespace ColorDB
+namespace HairDB
{
/**
* Loads the color data from <code>colors.xml</code>.
@@ -43,7 +44,7 @@ namespace ColorDB
int size();
- // Color DB
+ // Hair Color DB
typedef std::map<int, std::string> Colors;
typedef Colors::iterator ColorIterator;
}