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.SetSize(sizeof(Ikari));
36 td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), stringId, true));
37 td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), numberId, false));
38 td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), targetsId, false));
39 td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), boolId, true));