X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;fp=src%2Fgraphics%2FSimpleAnimation.cpp;h=17a0857832ce8dcfbe75b297f9113515aad4f8a3;hb=46d158b25b842d2ec4b9734af09ca6006c934498;hp=4e16b81658ec4a6dee2eec4a0eaeaffd7a7c2e01;hpb=ac3755adc509404528ef7de58695bf8e3bfb7dcd;p=l2e.git diff --git a/src/graphics/SimpleAnimation.cpp b/src/graphics/SimpleAnimation.cpp index 4e16b81..17a0857 100644 --- a/src/graphics/SimpleAnimation.cpp +++ b/src/graphics/SimpleAnimation.cpp @@ -17,13 +17,14 @@ 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 animationId(TypeDescription::GetTypeId("Animation")); int numberId(TypeDescription::GetTypeId("Number")); + TypeDescription &td(TypeDescription::CreateOrGet("SimpleAnimation")); + td.SetSize(sizeof(SimpleAnimation)); + td.AddSupertype(animationId, ((char *)a) - ((char *)&sa)); + 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));