X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FPartyLayout.cpp;h=e46b276d685b038efe2ce04bbf9f07295c40827e;hb=0b11a24a8b08c49d6e4301573602fb6d01e7a8c8;hp=c2bb452eec6b7ae0f5edc2f07bc6efc0c1c5b77c;hpb=b02da898c7c8a08141df4e797774a61cf5e0163f;p=l2e.git diff --git a/src/battle/PartyLayout.cpp b/src/battle/PartyLayout.cpp index c2bb452..e46b276 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 math::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) {