summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-05 17:29:03 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-05 17:29:03 +0300
commit3fae3f59aad1f1f2eee1e1bfa088672787bc9c78 (patch)
tree570faffa2f7e786bc00feb2519031d6c46fedd0e /src/being
parent34bc5498ea3098ca83d454b1745255f060ab2797 (diff)
downloadplus-3fae3f59aad1f1f2eee1e1bfa088672787bc9c78.tar.gz
plus-3fae3f59aad1f1f2eee1e1bfa088672787bc9c78.tar.bz2
plus-3fae3f59aad1f1f2eee1e1bfa088672787bc9c78.tar.xz
plus-3fae3f59aad1f1f2eee1e1bfa088672787bc9c78.zip
Move getNumOfHairstyles from being to itemdb.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp24
-rw-r--r--src/being/being.h11
2 files changed, 0 insertions, 35 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index a0add020e..49fb6a480 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -103,9 +103,6 @@
const unsigned int CACHE_SIZE = 50;
-int Being::mNumberOfHairstyles = 1;
-int Being::mNumberOfRaces = 1;
-
int Being::mUpdateConfigTime = 0;
unsigned int Being::mConfLineLim = 0;
int Being::mSpeechType = 0;
@@ -2625,27 +2622,6 @@ void Being::dumpSprites() const restrict2
}
}
-void Being::load()
-{
- // Hairstyles are encoded as negative numbers. Count how far negative
- // we can go.
- int hairstyles = 1;
- while (ItemDB::get(-hairstyles).getSprite(Gender::MALE,
- BeingTypeId_zero) != paths.getStringValue("spriteErrorFile"))
- {
- hairstyles ++;
- }
- mNumberOfHairstyles = hairstyles;
-
- int races = 100;
- while (ItemDB::get(-races).getSprite(Gender::MALE, BeingTypeId_zero) !=
- paths.getStringValue("spriteErrorFile"))
- {
- races ++;
- }
- mNumberOfRaces = races - 100;
-}
-
void Being::updateName() restrict2
{
if (mShowName)
diff --git a/src/being/being.h b/src/being/being.h
index afcc61839..1fd7aa0ba 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -327,12 +327,6 @@ class Being notfinal : public ActorSprite,
const std::string &restrict color = "") restrict2;
/**
- * Get the number of hairstyles implemented
- */
- static int getNumOfHairstyles() noexcept A_WARN_UNUSED
- { return mNumberOfHairstyles; }
-
- /**
* Get the number of layers used to draw the being
*/
int getNumberOfLayers() const restrict2 override A_WARN_UNUSED
@@ -548,8 +542,6 @@ class Being notfinal : public ActorSprite,
const int width,
const int height) const restrict2 A_NONNULL(2);
- static void load();
-
void optionChanged(const std::string &restrict value)
restrict2 override;
@@ -1029,9 +1021,6 @@ class Being notfinal : public ActorSprite,
/** Engine-related infos about weapon. */
const ItemInfo *restrict mEquippedWeapon;
- static int mNumberOfHairstyles; /** Number of hair styles in use */
- static int mNumberOfRaces; /** Number of races in use */
-
Path mPath;
Text *restrict mText;
const Color *restrict mTextColor;