]> git.localhorst.tv Git - l2e.git/blob - src/common/TargetingMode.cpp
added l2 object files to gitignore
[l2e.git] / src / common / TargetingMode.cpp
1 /*
2  * TargetingMode.cpp
3  *
4  *  Created on: Sep 9, 2012
5  *      Author: holy
6  */
7
8 #include "TargetingMode.h"
9
10 #include "../loader/TypeDescription.h"
11
12 using loader::FieldDescription;
13 using loader::TypeDescription;
14
15 namespace common {
16
17 void TargetingMode::CreateTypeDescription() {
18         TargetingMode t;
19
20         int boolId(TypeDescription::GetTypeId("Boolean"));
21         int numberId(TypeDescription::GetTypeId("Number"));
22
23         TypeDescription &td(TypeDescription::CreateOrGet("TargetingMode"));
24         td.SetConstructor(&Construct);
25         td.SetSize(sizeof(TargetingMode));
26
27         td.AddField("faction", FieldDescription(((char *)&t.ally) - ((char *)&t), boolId, false));
28         td.AddField("mode", FieldDescription(((char *)&t.mode) - ((char *)&t), numberId, false));
29 }
30
31 void TargetingMode::Construct(void *data) {
32         new (data) TargetingMode;
33 }
34
35 }