]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/ComplexAnimation.cpp
added capsule attack/animation handling
[l2e.git] / src / graphics / ComplexAnimation.cpp
index f999c4af18f748d7129e71056074aa40b49e586b..bd2eaf8732b7044b28a1d770d87539301a4f474a 100644 (file)
@@ -3,12 +3,47 @@
 #include "../loader/Interpreter.h"
 #include "../loader/TypeDescription.h"
 
+using geometry::Vector;
 using loader::FieldDescription;
 using loader::Interpreter;
 using loader::TypeDescription;
 
 namespace graphics {
 
+ComplexAnimation::ComplexAnimation()
+: frames(0)
+, numFrames(0) {
+
+}
+
+ComplexAnimation::ComplexAnimation(
+               const Sprite *sprite,
+               int frameTime,
+               bool repeat)
+: Animation(sprite, frameTime, repeat)
+, frames(0)
+, numFrames(0) {
+
+}
+
+
+int ComplexAnimation::NumFrames() const {
+       return numFrames;
+}
+
+int ComplexAnimation::Col(int frame) const {
+       return frames[frame].col;
+}
+
+int ComplexAnimation::Row(int frame) const {
+       return frames[frame].row;
+}
+
+Vector<int> ComplexAnimation::Offset(int frame) const {
+       return frames[frame].disposition;
+}
+
+
 void ComplexAnimation::CreateTypeDescription() {
        ComplexAnimation ca;
        Animation *a(&ca);