X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;fp=src%2Fgraphics%2FSimpleAnimation.cpp;h=24985f91ebb12e5db89143389f29a29a71f2d4d8;hb=2255d436a0c2acc10b015827366a72b2ece86094;hp=baed3419188b2f393e0e27ade3d3b56f7e38f0f3;hpb=e1edc92c4fb834c8061118e89c0d7e239742b030;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);