summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp14
-rw-r--r--src/being/being.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 618922fa3..4c750f5c8 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -3156,6 +3156,12 @@ void Being::setHairColor(const unsigned int slot,
}
}
+void Being::setSpriteSlot(const unsigned int slot,
+ const BeingSlot &beingSlot)
+{
+ mSlots[slot] = beingSlot;
+}
+
void Being::dumpSprites() const restrict2
{
std::vector<BeingSlot>::const_iterator it1 = mSlots.begin();
@@ -4429,6 +4435,14 @@ int Being::getSpriteID(const int slot) const restrict2
return mSlots[slot].spriteId;
}
+const BeingSlot &Being::getSpriteSlot(const int slot) const restrict2
+{
+ if (slot < 0 || CAST_SIZE(slot) >= mSlots.size())
+ return *emptyBeingSlot;
+
+ return mSlots[slot];
+}
+
ItemColor Being::getSpriteColor(const int slot) const restrict2
{
if (slot < 0 || CAST_SIZE(slot) >= mSlots.size())
diff --git a/src/being/being.h b/src/being/being.h
index 376c180d5..bf05d091b 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -842,6 +842,9 @@ class Being notfinal : public ActorSprite,
int getSpriteID(const int slot) const restrict2 A_WARN_UNUSED;
+ const BeingSlot &getSpriteSlot(const int slot) const
+ restrict2 A_WARN_UNUSED;
+
ItemColor getSpriteColor(const int slot) const restrict2 A_WARN_UNUSED;
void setHairStyle(const unsigned int slot,
@@ -853,6 +856,9 @@ class Being notfinal : public ActorSprite,
void setHairColor(const ItemColor color) restrict2 noexcept2
{ mHairColor = color; }
+ void setSpriteSlot(const unsigned int slot,
+ const BeingSlot &beingSlot);
+
ItemColor getHairColor() const noexcept2 A_WARN_UNUSED
{ return mHairColor; }