X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;h=24985f91ebb12e5db89143389f29a29a71f2d4d8;hb=60e0fe29ce6cd033edc78b181d9d07fa72c11172;hp=91620648ba7ae4107c2751a67b4668036cdae5c4;hpb=1907ca03c5e865c4d398170042aa384c67ffff29;p=l2e.git diff --git a/src/graphics/SimpleAnimation.cpp b/src/graphics/SimpleAnimation.cpp index 9162064..24985f9 100644 --- a/src/graphics/SimpleAnimation.cpp +++ b/src/graphics/SimpleAnimation.cpp @@ -1,10 +1,3 @@ -/* - * SimpleAnimation.cpp - * - * Created on: Sep 5, 2012 - * Author: holy - */ - #include "SimpleAnimation.h" #include "../loader/Interpreter.h" @@ -16,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);