X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.cpp;h=e4e538d90250abf4bb06034989f95cf247ba171a;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=d151f2559e2ac0da0831dcfdefd5e3ac7aeaff57;hpb=be7b4addf295d6193ba2527cdd17cdb524339aed;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; +} + }