summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/spritedef.h')
-rw-r--r--src/resources/spritedef.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index b2939fca1..642962c0b 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -117,7 +117,9 @@ class SpriteDef : public Resource
/**
* Returns the specified action.
*/
- Action *getAction(std::string action) const;
+ Action *getAction(std::string action, unsigned num) const;
+
+ unsigned findNumber(unsigned num) const;
/**
* Converts a string into a SpriteDirection enum.
@@ -125,11 +127,14 @@ class SpriteDef : public Resource
static SpriteDirection
makeSpriteDirection(const std::string &direction);
+ void addAction(unsigned hp, std::string name, Action *action);
+
private:
/**
* Constructor.
*/
- SpriteDef() {}
+ SpriteDef()
+ { }
/**
* Destructor.
@@ -178,7 +183,8 @@ class SpriteDef : public Resource
typedef std::map<std::string, ImageSet*> ImageSets;
typedef ImageSets::iterator ImageSetIterator;
- typedef std::map<std::string, Action*> Actions;
+// typedef std::map<std::string, std::map<unsigned, Action*>*> Actions;
+ typedef std::map<unsigned, std::map<std::string, Action*>*> Actions;
ImageSets mImageSets;
Actions mActions;