X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FPartyLayout.cpp;h=bf8b3e8623d3d6d3987d6ba3075b264aa32d8a6d;hb=988ba6d1b4e18a4ae5d30a892224f76cee2355cc;hp=c2bb452eec6b7ae0f5edc2f07bc6efc0c1c5b77c;hpb=b02da898c7c8a08141df4e797774a61cf5e0163f;p=l2e.git diff --git a/src/battle/PartyLayout.cpp b/src/battle/PartyLayout.cpp index c2bb452..bf8b3e8 100644 --- a/src/battle/PartyLayout.cpp +++ b/src/battle/PartyLayout.cpp @@ -1,16 +1,11 @@ -/* - * PartyLayout.cpp - * - * Created on: Aug 5, 2012 - * Author: holy - */ - #include "PartyLayout.h" +#include "../loader/Interpreter.h" #include "../loader/TypeDescription.h" using geometry::Vector; using loader::FieldDescription; +using loader::Interpreter; using loader::TypeDescription; using std::vector; @@ -39,13 +34,12 @@ void PartyLayout::CalculatePositions(int width, int height, vector > void PartyLayout::CreateTypeDescription() { PartyLayout p; - int vectorId(TypeDescription::GetTypeId("Vector")); - - TypeDescription &td(TypeDescription::CreateOrGet("PartyLayout")); + TypeDescription &td(TypeDescription::Create(TYPE_ID, "PartyLayout")); + td.SetDescription("Positions of party members"); td.SetConstructor(&Construct); td.SetSize(sizeof(PartyLayout)); - td.AddField("positions", FieldDescription(((char *)&p.positions) - ((char *)&p), vectorId, true, true)); + td.AddField("positions", FieldDescription(((char *)&p.positions) - ((char *)&p), Interpreter::VECTOR_ID).SetReferenced().SetAggregate().SetDescription("the members' positions")); } void PartyLayout::Construct(void *data) {