From badba244423ba8fccb246afaa8b1dd0c1448b370 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Jul 2011 21:44:28 +0300 Subject: Reorders sprites now depend on player direction. --- src/resources/iteminfo.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/resources/iteminfo.h') 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 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, [direction] SpriteToItemMap *mSpriteToItemReplaceMap[9]; -- cgit v1.2.3-60-g2f50