X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.cpp;fp=src%2Fgraphics%2FSimpleAnimation.cpp;h=cdd3a8e040f784d0bcb4cd76546d0743fc40fb45;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=f1c1a724dea74e95b1ef8cdd85d4c75d55cb01e9;hpb=be7b4addf295d6193ba2527cdd17cdb524339aed;p=l2e.git diff --git a/src/graphics/SimpleAnimation.cpp b/src/graphics/SimpleAnimation.cpp index f1c1a72..cdd3a8e 100644 --- a/src/graphics/SimpleAnimation.cpp +++ b/src/graphics/SimpleAnimation.cpp @@ -24,6 +24,7 @@ void SimpleAnimation::CreateTypeDescription() { int spriteId(TypeDescription::GetTypeId("Sprite")); TypeDescription &td(TypeDescription::CreateOrGet("SimpleAnimation")); + td.SetConstructor(&Construct); td.SetSize(sizeof(SimpleAnimation)); td.AddSupertype(animationId, ((char *)a) - ((char *)&sa)); @@ -33,4 +34,8 @@ void SimpleAnimation::CreateTypeDescription() { td.AddField("row", FieldDescription(((char *)&sa.row) - ((char *)&sa), numberId, false)); } +void SimpleAnimation::Construct(void *data) { + new (data) SimpleAnimation; +} + }