3 #include "../common/Script.h"
4 #include "../loader/Interpreter.h"
5 #include "../loader/TypeDescription.h"
7 using loader::FieldDescription;
8 using loader::Interpreter;
9 using loader::TypeDescription;
15 , type(TYPE_CONTACT) {
20 void Trigger::CreateTypeDescription() {
23 TypeDescription &td(TypeDescription::Create(TYPE_ID, "Trigger"));
24 td.SetConstructor(&Construct);
25 td.SetSize(sizeof(Trigger));
27 td.AddField("script", FieldDescription(((char *)&t.script) - ((char *)&t), Interpreter::SCRIPT_ID).SetReferenced());
28 td.AddField("position", FieldDescription(((char *)&t.tilePosition) - ((char *)&t), Interpreter::VECTOR_ID));
29 td.AddField("type", FieldDescription(((char *)&t.type) - ((char *)&t), Interpreter::NUMBER_ID));
32 void Trigger::Construct(void *data) {