-/*
- * ComplexAnimation.cpp
- *
- * Created on: Sep 5, 2012
- * Author: holy
- */
-
#include "ComplexAnimation.h"
#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<int> ComplexAnimation::Offset(int frame) const {
+ return frames[frame].disposition;
+}
+
+
void ComplexAnimation::CreateTypeDescription() {
ComplexAnimation ca;
Animation *a(&ca);