summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
commit7f819e46b584145e2cf2ea742ced9fab0ffc233e (patch)
tree9aa8ee99a4b4dd653917155282e82e6b9a64f718 /src/resources/spritedef.h
parentcc86266f4b59420a155df8c1aa01b9ce20b6585d (diff)
downloadmana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.gz
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.bz2
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.xz
mana-7f819e46b584145e2cf2ea742ced9fab0ffc233e.zip
Made Being::mDirection protected, forcing the use of setDirection. Defaulted
variant argument to 0 since this is the most common situation. Some SpriteDef refactoring, splitting up the loading into several methods, in preparation of adding support for including other sprites.
Diffstat (limited to 'src/resources/spritedef.h')
-rw-r--r--src/resources/spritedef.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h
index 51c47a24..64414259 100644
--- a/src/resources/spritedef.h
+++ b/src/resources/spritedef.h
@@ -29,6 +29,8 @@
#include <map>
#include <string>
+#include <libxml/tree.h>
+
class Action;
class Graphics;
class Spriteset;
@@ -96,6 +98,32 @@ class SpriteDef : public Resource
load(const std::string &file, int variant);
/**
+ * Loads an imageset element.
+ */
+ void
+ loadImageSet(xmlNodePtr node);
+
+ /**
+ * Loads an action element.
+ */
+ void
+ loadAction(xmlNodePtr node, int variant_offset);
+
+ /**
+ * Loads an animation element.
+ */
+ void
+ loadAnimation(xmlNodePtr animationNode,
+ Action *action, Spriteset *imageset,
+ int variant_offset);
+
+ /**
+ * Include another sprite into this one.
+ */
+ void
+ includeSprite(xmlNodePtr includeNode);
+
+ /**
* When there are no animations defined for the action "complete", its
* animations become a copy of those of the action "with".
*/