4 * Created on: Aug 10, 2012
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
25 void Ikari::CreateTypeDescription() {
28 int boolId(TypeDescription::GetTypeId("Boolean"));
29 int numberId(TypeDescription::GetTypeId("Number")); // FIXME: need small number type
30 int stringId(TypeDescription::GetTypeId("String"));
31 int targetsId(TypeDescription::GetTypeId("TargetingMode"));
33 TypeDescription &td(TypeDescription::CreateOrGet("Ikari"));
34 td.SetConstructor(&Construct);
35 td.SetSize(sizeof(Ikari));
37 td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), stringId, true));
38 td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), numberId, false));
39 td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), targetsId, false));
40 td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), boolId, false));
43 void Ikari::Construct(void *data) {