X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FPartyLayout.cpp;h=27d587e7c165e68a2d4f0128ae00a8ac2aa1deec;hb=6e88a625710c7936f87b38ecf6094472f3a49f4f;hp=ad0a54877c6b3c53e9266ea76cdeaa5c869cd2e4;hpb=06cdcf42d8f86955419bcf8ca3457f1d59a14707;p=l2e.git diff --git a/src/battle/PartyLayout.cpp b/src/battle/PartyLayout.cpp index ad0a548..27d587e 100644 --- a/src/battle/PartyLayout.cpp +++ b/src/battle/PartyLayout.cpp @@ -38,13 +38,19 @@ void PartyLayout::CalculatePositions(int width, int height, vector > void PartyLayout::CreateTypeDescription() { PartyLayout p; - TypeDescription &td(TypeDescription::CreateOrGet("PartyLayout")); + int vectorId(TypeDescription::GetTypeId("Vector")); + + TypeDescription &td(TypeDescription::CreateOrGet("PartyLayout")); + td.SetDescription("Positions of party members"); + td.SetConstructor(&Construct); td.SetSize(sizeof(PartyLayout)); - int vectorId(TypeDescription::GetTypeId("Vector")); + td.AddField("positions", FieldDescription(((char *)&p.positions) - ((char *)&p), vectorId).SetReferenced().SetAggregate().SetDescription("the members' positions")); +} - td.AddField("positions", FieldDescription(((char *)&p.positions) - ((char *)&p), vectorId, true, true)); +void PartyLayout::Construct(void *data) { + new (data) PartyLayout; } }