4 * Created on: Sep 5, 2012
8 #include "ComplexAnimation.h"
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
17 void ComplexAnimation::CreateTypeDescription() {
21 int animationId(TypeDescription::GetTypeId("Animation"));
22 int frameId(TypeDescription::GetTypeId("ComplexAnimationFrame"));
24 TypeDescription &td(TypeDescription::CreateOrGet("ComplexAnimation"));
25 td.SetSize(sizeof(ComplexAnimation));
26 td.AddSupertype(animationId, ((char *)a) - ((char *)&ca));
28 td.AddField("frames", FieldDescription(((char *)&ca.frames) - ((char *)&ca), frameId, true, true));
33 int numberId(TypeDescription::GetTypeId("Number"));
34 int vectorId(TypeDescription::GetTypeId("Vector"));
36 TypeDescription &ftd(TypeDescription::CreateOrGet("ComplexAnimationFrame"));
37 ftd.SetSize(sizeof(FrameProp));
39 ftd.AddField("column", FieldDescription(((char *)&fp.col) - ((char *)&fp), numberId, false));
40 ftd.AddField("row", FieldDescription(((char *)&fp.row) - ((char *)&fp), numberId, false));
41 ftd.AddField("disposition", FieldDescription(((char *)&fp.disposition) - ((char *)&fp), vectorId, false));