summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.cpp8
-rw-r--r--src/being/actorsprite.h4
-rw-r--r--src/being/being.cpp16
-rw-r--r--src/being/flooritem.cpp2
4 files changed, 16 insertions, 14 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 6c2c99a40..6594c7e3c 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -429,7 +429,7 @@ void ActorSprite::handleStatusEffect(const StatusEffect *const effect,
void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
const ForceDisplay forceDisplay,
- const int imageType,
+ const DisplayTypeT displayType,
const std::string &color)
{
clear();
@@ -457,14 +457,14 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
else
{
std::string imagePath;
- switch (imageType)
+ switch (displayType)
{
- case 0:
+ case DisplayType::Item:
default:
imagePath = pathJoin(paths.getStringValue("itemIcons"),
display.image);
break;
- case 1:
+ case DisplayType::Floor:
imagePath = pathJoin(paths.getStringValue("itemIcons"),
display.floor);
break;
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index ff413f040..db912e059 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -36,6 +36,8 @@
#include "enums/simpletypes/forcedisplay.h"
#include "enums/simpletypes/isstart.h"
+#include "enums/resources/displaytype.h"
+
#include "enums/resources/map/blocktype.h"
#include "particle/particlelist.h"
@@ -228,7 +230,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
void setupSpriteDisplay(const SpriteDisplay &display,
const ForceDisplay forceDisplay,
- const int imageType,
+ const DisplayTypeT displayType,
const std::string &color);
/** Load the target cursors into memory */
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e43b71600..be998d05d 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -388,7 +388,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_true,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -400,7 +400,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_true,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -412,7 +412,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_true,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -424,7 +424,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_true,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -436,7 +436,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_false,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -448,7 +448,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setName(mInfo->getName());
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_false,
- 0,
+ DisplayType::Item,
mInfo->getColor(fromInt(mLook, ItemColor)));
mYDiff = mInfo->getSortOffsetY();
}
@@ -459,7 +459,7 @@ void Being::setSubtype(const BeingTypeId subtype,
{
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_false,
- 0,
+ DisplayType::Item,
std::string());
mYDiff = mInfo->getSortOffsetY();
}
@@ -470,7 +470,7 @@ void Being::setSubtype(const BeingTypeId subtype,
{
setupSpriteDisplay(mInfo->getDisplay(),
ForceDisplay_false,
- 0,
+ DisplayType::Item,
std::string());
}
break;
diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp
index 545bae892..a69b8af0e 100644
--- a/src/being/flooritem.cpp
+++ b/src/being/flooritem.cpp
@@ -120,7 +120,7 @@ void FloorItem::postInit(Map *const map, int subX, int subY)
mCursor = info.getPickupCursor();
setupSpriteDisplay(info.getDisplay(),
ForceDisplay_true,
- 1,
+ DisplayType::Floor,
info.getDyeIconColorsString(mColor));
}