4 * Created on: Sep 9, 2012
8 #include "TargetingMode.h"
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
17 void TargetingMode::CreateTypeDescription() {
20 int boolId(TypeDescription::GetTypeId("Boolean"));
21 int numberId(TypeDescription::GetTypeId("Number"));
23 TypeDescription &td(TypeDescription::CreateOrGet("TargetingMode"));
24 td.SetConstructor(&Construct);
25 td.SetSize(sizeof(TargetingMode));
27 td.AddField("faction", FieldDescription(((char *)&t.ally) - ((char *)&t), boolId, false));
28 td.AddField("mode", FieldDescription(((char *)&t.mode) - ((char *)&t), numberId, false));
31 void TargetingMode::Construct(void *data) {
32 new (data) TargetingMode;