4 * Created on: Oct 3, 2012
10 #include "../loader/Interpreter.h"
11 #include "../loader/TypeDescription.h"
13 using loader::FieldDescription;
14 using loader::Interpreter;
15 using loader::TypeDescription;
21 , type(TYPE_CONTACT) {
26 void Trigger::CreateTypeDescription() {
29 TypeDescription &td(TypeDescription::Create(TYPE_ID, "Trigger"));
30 td.SetConstructor(&Construct);
31 td.SetSize(sizeof(Trigger));
33 td.AddField("script", FieldDescription(((char *)&t.script) - ((char *)&t), Interpreter::SCRIPT_ID).SetReferenced());
34 td.AddField("position", FieldDescription(((char *)&t.tilePosition) - ((char *)&t), Interpreter::VECTOR_ID));
35 td.AddField("type", FieldDescription(((char *)&t.type) - ((char *)&t), Interpreter::NUMBER_ID));
38 void Trigger::Construct(void *data) {