summaryrefslogtreecommitdiff
path: root/src/resources/iteminfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-25 21:44:28 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-25 22:18:16 +0300
commitbadba244423ba8fccb246afaa8b1dd0c1448b370 (patch)
treed2f72ed78b3a3c9be195a2b33036c207b551066f /src/resources/iteminfo.h
parent24e2ae34bfc9e6b96b890893ece422170fb7d42f (diff)
downloadplus-badba244423ba8fccb246afaa8b1dd0c1448b370.tar.gz
plus-badba244423ba8fccb246afaa8b1dd0c1448b370.tar.bz2
plus-badba244423ba8fccb246afaa8b1dd0c1448b370.tar.xz
plus-badba244423ba8fccb246afaa8b1dd0c1448b370.zip
Reorders sprites now depend on player direction.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r--src/resources/iteminfo.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index b977a94ce..d8b8c7b0d 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -207,23 +207,19 @@ class ItemInfo
const std::string &getSound(EquipmentSoundEvent event) const;
- int getDrawBefore() const
- { return mDrawBefore; }
+ int getDrawBefore(int direction) const;
- void setDrawBefore(int n)
- { mDrawBefore = n; }
+ void setDrawBefore(int direction, int n);
- int getDrawAfter() const
- { return mDrawAfter; }
+ int getDrawAfter(int direction) const;
- void setDrawAfter(int n)
- { mDrawAfter = n; }
+ void setDrawAfter(int direction, int n);
- int getDrawPriority() const
- { return mDrawPriority; }
+ int getDrawPriority(int direction) const;
- void setDrawPriority(int n)
- { mDrawPriority = n; }
+ void setDrawPriority(int direction, int n);
+
+ void setSpriteOrder(int *ptr, int direction, int n, int def = -1);
std::map<int, int> getTags() const
{ return mTags; }
@@ -271,9 +267,9 @@ class ItemInfo
int mWeight; /**< Weight in grams. */
int mView; /**< Item ID of how this item looks. */
int mId; /**< Item ID */
- int mDrawBefore;
- int mDrawAfter;
- int mDrawPriority;
+ int mDrawBefore[9];
+ int mDrawAfter[9];
+ int mDrawPriority[9];
bool mIsRemoveSprites;
// sprite, <itemfrom, itemto> [direction]
SpriteToItemMap *mSpriteToItemReplaceMap[9];