]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/PartyLayout.cpp
switched to static type IDs
[l2e.git] / src / battle / PartyLayout.cpp
index 27d587e7c165e68a2d4f0128ae00a8ac2aa1deec..c9451cbc6cf22fbfdd2cdb3ea47af493b00d7edf 100644 (file)
@@ -7,10 +7,12 @@
 
 #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,14 +41,12 @@ void PartyLayout::CalculatePositions(int width, int height, vector<Vector<int> >
 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).SetReferenced().SetAggregate().SetDescription("the members' positions"));
+       td.AddField("positions", FieldDescription(((char *)&p.positions) - ((char *)&p), Interpreter::VECTOR_ID).SetReferenced().SetAggregate().SetDescription("the members' positions"));
 }
 
 void PartyLayout::Construct(void *data) {