X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.cpp;h=e4e538d90250abf4bb06034989f95cf247ba171a;hb=a67a3c4f6bc11cd5284d6c5aabf4a3e180517a03;hp=d151f2559e2ac0da0831dcfdefd5e3ac7aeaff57;hpb=46d158b25b842d2ec4b9734af09ca6006c934498;p=l2e.git diff --git a/src/graphics/Font.cpp b/src/graphics/Font.cpp index d151f25..e4e538d 100644 --- a/src/graphics/Font.cpp +++ b/src/graphics/Font.cpp @@ -82,6 +82,7 @@ void Font::CreateTypeDescription() { int spriteId(TypeDescription::GetTypeId("Sprite")); TypeDescription &td(TypeDescription::CreateOrGet("Font")); + td.SetConstructor(&Construct); td.SetSize(sizeof(Font)); td.AddField("sprite", FieldDescription(((char *)&f.sprite) - ((char *)&f), spriteId, true)); @@ -89,4 +90,8 @@ void Font::CreateTypeDescription() { td.AddField("rowoffset", FieldDescription(((char *)&f.rowOffset) - ((char *)&f), numberId, false)); } +void Font::Construct(void *data) { + new (data) Font; +} + }