X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FGauge.cpp;h=b7023d40538b68075a0085ccd111201bca95f44e;hb=b02da898c7c8a08141df4e797774a61cf5e0163f;hp=6925c2ff2482ae1a302d60a8d9f3bc77add64a7c;hpb=be7b4addf295d6193ba2527cdd17cdb524339aed;p=l2e.git diff --git a/src/graphics/Gauge.cpp b/src/graphics/Gauge.cpp index 6925c2f..b7023d4 100644 --- a/src/graphics/Gauge.cpp +++ b/src/graphics/Gauge.cpp @@ -91,6 +91,7 @@ void Gauge::CreateTypeDescription() { int vectorId(TypeDescription::GetTypeId("Vector")); TypeDescription &td(TypeDescription::CreateOrGet("Gauge")); + td.SetConstructor(&Construct); td.SetSize(sizeof(Gauge)); td.AddField("image", FieldDescription(((char *)&g.surface) - ((char *)&g), imageId, true)); @@ -102,4 +103,8 @@ void Gauge::CreateTypeDescription() { td.AddField("end", FieldDescription(((char *)&g.endWidth) - ((char *)&g), numberId, false)); } +void Gauge::Construct(void *data) { + new (data) Gauge; +} + }