summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-02 14:43:40 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-06 22:21:57 -0600
commit9baedc27191c82bbf1fedee2a7e738bc5b267c0e (patch)
treef0986c6839d1e79b402d5d4ec36e4994741955ea /src/resources/spritedef.h
parent844e9a7a72faca6a212e788a3adc45e17f41dca6 (diff)
downloadmana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.gz
mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.bz2
mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.xz
mana-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.zip
Add support for floor item sprites
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
Diffstat (limited to 'src/resources/spritedef.h')
-rw-r--r--src/resources/spritedef.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 5bb6078e..d5db542c 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -26,12 +26,28 @@
#include <libxml/tree.h>
+#include <list>
#include <map>
#include <string>
class Action;
class ImageSet;
+struct SpriteReference
+{
+ std::string sprite;
+ int variant;
+};
+
+struct SpriteDisplay
+{
+ std::string image;
+ std::list<SpriteReference*> sprites;
+ std::list<std::string> particles;
+};
+
+typedef std::list<SpriteReference*>::const_iterator SpriteRefs;
+
enum SpriteAction
{
ACTION_DEFAULT = 0,