]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/SimpleAnimation.cpp
added constructors for described types
[l2e.git] / src / graphics / SimpleAnimation.cpp
index f1c1a724dea74e95b1ef8cdd85d4c75d55cb01e9..cdd3a8e040f784d0bcb4cd76546d0743fc40fb45 100644 (file)
@@ -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;
+}
+
 }