X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;fp=src%2Fgraphics%2FSimpleAnimation.cpp;h=4e16b81658ec4a6dee2eec4a0eaeaffd7a7c2e01;hb=bcbb72013091db29a085d044f200c10d66b7c47a;hp=0000000000000000000000000000000000000000;hpb=d6d77b62f44e04f2bae82017961c5e4b9b1f31b5;p=l2e.git diff --git a/src/graphics/SimpleAnimation.cpp b/src/graphics/SimpleAnimation.cpp new file mode 100644 index 0000000..4e16b81 --- /dev/null +++ b/src/graphics/SimpleAnimation.cpp @@ -0,0 +1,32 @@ +/* + * SimpleAnimation.cpp + * + * Created on: Sep 5, 2012 + * Author: holy + */ + +#include "SimpleAnimation.h" + +#include "../loader/TypeDescription.h" + +using loader::FieldDescription; +using loader::TypeDescription; + +namespace graphics { + +void SimpleAnimation::CreateTypeDescription() { + SimpleAnimation sa; + Animation *a(&sa); + TypeDescription &td(TypeDescription::CreateOrGet("SimpleAnimation")); + + td.SetSize(sizeof(SimpleAnimation)); + td.AddSupertype(TypeDescription::GetTypeId("Animation"), ((char *)a) - ((char *)&sa)); + + int numberId(TypeDescription::GetTypeId("Number")); + + td.AddField("framecount", FieldDescription(((char *)&sa.numFrames) - ((char *)&sa), numberId, false)); + td.AddField("col", FieldDescription(((char *)&sa.col) - ((char *)&sa), numberId, false)); + td.AddField("row", FieldDescription(((char *)&sa.row) - ((char *)&sa), numberId, false)); +} + +}