X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FComplexAnimation.cpp;h=c1b88c18d789aa2c7fb847331fb6b07a8c326be8;hb=7582af9fc5f909ef38509c0421e9dbea3c005764;hp=f999c4af18f748d7129e71056074aa40b49e586b;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/graphics/ComplexAnimation.cpp b/src/graphics/ComplexAnimation.cpp index f999c4a..c1b88c1 100644 --- a/src/graphics/ComplexAnimation.cpp +++ b/src/graphics/ComplexAnimation.cpp @@ -3,12 +3,47 @@ #include "../loader/Interpreter.h" #include "../loader/TypeDescription.h" +using math::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 ComplexAnimation::Offset(int frame) const { + return frames[frame].disposition; +} + + void ComplexAnimation::CreateTypeDescription() { ComplexAnimation ca; Animation *a(&ca);