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.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index b2939fca1..3aa6369dd 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -29,6 +29,7 @@
#include <list>
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -117,7 +118,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 +128,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.
@@ -177,11 +183,12 @@ 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, Action*> ActionMap;
+ typedef std::map<unsigned, ActionMap*> Actions;
ImageSets mImageSets;
Actions mActions;
+ std::set<std::string> mProcessedFiles;
};
#endif // SPRITEDEF_H