X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;h=24985f91ebb12e5db89143389f29a29a71f2d4d8;hb=7df7c6eca83c2b5c0ee17c55340d8863f9d638f5;hp=baed3419188b2f393e0e27ade3d3b56f7e38f0f3;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/graphics/SimpleAnimation.cpp b/src/graphics/SimpleAnimation.cpp index baed341..24985f9 100644 --- a/src/graphics/SimpleAnimation.cpp +++ b/src/graphics/SimpleAnimation.cpp @@ -9,6 +9,41 @@ using loader::TypeDescription; namespace graphics { +SimpleAnimation::SimpleAnimation() +: numFrames(0) +, col(0) +, row(0) { + +} + +SimpleAnimation::SimpleAnimation( + const Sprite *sprite, + int frameTime, + int numFrames, + int col, + int row, + bool repeat) +: Animation(sprite, frameTime, repeat) +, numFrames(numFrames) +, col(col) +, row(row) { + +} + + +int SimpleAnimation::NumFrames() const { + return numFrames; +} + +int SimpleAnimation::Col(int frame) const { + return col; +} + +int SimpleAnimation::Row(int frame) const { + return row + frame; +} + + void SimpleAnimation::CreateTypeDescription() { SimpleAnimation sa; Animation *a(&sa);