X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FComplexAnimation.cpp;fp=src%2Fgraphics%2FComplexAnimation.cpp;h=e4d293cdd920297799adda7225ad5fe59e21e5e5;hb=46d158b25b842d2ec4b9734af09ca6006c934498;hp=b54baf9396aeb7e56b1c26efe3198c3571162327;hpb=ac3755adc509404528ef7de58695bf8e3bfb7dcd;p=l2e.git diff --git a/src/graphics/ComplexAnimation.cpp b/src/graphics/ComplexAnimation.cpp index b54baf9..e4d293c 100644 --- a/src/graphics/ComplexAnimation.cpp +++ b/src/graphics/ComplexAnimation.cpp @@ -17,24 +17,25 @@ namespace graphics { void ComplexAnimation::CreateTypeDescription() { ComplexAnimation ca; Animation *a(&ca); - TypeDescription &td(TypeDescription::CreateOrGet("ComplexAnimation")); - - td.SetSize(sizeof(ComplexAnimation)); - td.AddSupertype(TypeDescription::GetTypeId("Animation"), ((char *)a) - ((char *)&ca)); + int animationId(TypeDescription::GetTypeId("Animation")); int frameId(TypeDescription::GetTypeId("ComplexAnimationFrame")); + TypeDescription &td(TypeDescription::CreateOrGet("ComplexAnimation")); + td.SetSize(sizeof(ComplexAnimation)); + td.AddSupertype(animationId, ((char *)a) - ((char *)&ca)); + td.AddField("frames", FieldDescription(((char *)&ca.frames) - ((char *)&ca), frameId, true, true)); FrameProp fp; - TypeDescription &ftd(TypeDescription::CreateOrGet("ComplexAnimationFrame")); - - ftd.SetSize(sizeof(FrameProp)); int numberId(TypeDescription::GetTypeId("Number")); int vectorId(TypeDescription::GetTypeId("Vector")); + TypeDescription &ftd(TypeDescription::CreateOrGet("ComplexAnimationFrame")); + ftd.SetSize(sizeof(FrameProp)); + ftd.AddField("column", FieldDescription(((char *)&fp.col) - ((char *)&fp), numberId, false)); ftd.AddField("row", FieldDescription(((char *)&fp.row) - ((char *)&fp), numberId, false)); ftd.AddField("disposition", FieldDescription(((char *)&fp.disposition) - ((char *)&fp), vectorId, false));