summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/beinginfo.cpp4
-rw-r--r--src/resources/beinginfo.h14
-rw-r--r--src/resources/monsterdb.cpp6
-rw-r--r--src/resources/npcdb.cpp7
4 files changed, 30 insertions, 1 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 1559f594c..5ffdb887d 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -43,7 +43,9 @@ BeingInfo::BeingInfo() :
mTargetOffsetY(0),
mMaxHP(0),
mStaticMaxHP(false),
- mTargetSelection(true)
+ mTargetSelection(true),
+ mSortOffsetY(0),
+ mDeadSortOffsetY(31)
{
SpriteDisplay display;
display.sprites.push_back(SpriteReference::Empty);
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index 2d5971f91..8b25b4564 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -151,6 +151,18 @@ class BeingInfo
bool isTargetSelection() const
{ return mTargetSelection; }
+ int getSortOffsetY()
+ { return mSortOffsetY; }
+
+ void setSortOffsetY(const int n)
+ { mSortOffsetY = n; }
+
+ int getDeadSortOffsetY()
+ { return mDeadSortOffsetY; }
+
+ void setDeadSortOffsetY(const int n)
+ { mDeadSortOffsetY = n; }
+
static void clear();
private:
@@ -166,6 +178,8 @@ class BeingInfo
int mMaxHP;
bool mStaticMaxHP;
bool mTargetSelection;
+ int mSortOffsetY;
+ int mDeadSortOffsetY;
};
typedef std::map<int, BeingInfo*> BeingInfos;
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 26c72ed2f..f4987afb0 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -95,6 +95,12 @@ void MonsterDB::load()
currentInfo->setMaxHP(XML::getProperty(monsterNode, "maxHP", 0));
+ currentInfo->setSortOffsetY(XML::getProperty(
+ monsterNode, "sortOffsetY", 0));
+
+ currentInfo->setDeadSortOffsetY(XML::getProperty(
+ monsterNode, "deadSortOffsetY", 31));
+
unsigned char block = 0;
std::string walkStr = XML::getProperty(
monsterNode, "walkType", "walk");
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index 3ce300138..81a89b611 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -85,6 +85,13 @@ void NPCDB::load()
currentInfo->setTargetOffsetY(XML::getProperty(npcNode,
"targetOffsetY", 0));
+
+ currentInfo->setSortOffsetY(XML::getProperty(npcNode,
+ "sortOffsetY", 0));
+
+ currentInfo->setDeadSortOffsetY(XML::getProperty(npcNode,
+ "deadSortOffsetY", 31));
+
SpriteDisplay display;
for_each_xml_child_node(spriteNode, npcNode)
{