-/*
- * Tile.cpp
- *
- * Created on: Sep 29, 2012
- * Author: holy
- */
-
#include "Tile.h"
+#include "../loader/Interpreter.h"
+#include "../loader/TypeDescription.h"
+
+using loader::FieldDescription;
+using loader::Interpreter;
+using loader::TypeDescription;
+
namespace map {
Tile::Tile()
-: flags(0) {
+: battlebg(0)
+, flags(0) {
+
+}
+
+
+void Tile::CreateTypeDescription() {
+ Tile t;
+
+ TypeDescription &td(TypeDescription::Create(TYPE_ID, "Tile"));
+ td.SetConstructor(&Construct);
+ td.SetSize(sizeof(Tile));
+
+ td.AddField("battlebg", FieldDescription(((char *)&t.battlebg) - ((char *)&t), Interpreter::IMAGE_ID).SetReferenced());
+ td.AddField("t", FieldDescription(((char *)&t.offset) - ((char *)&t), Interpreter::VECTOR_ID));
+ td.AddField("flags", FieldDescription(((char *)&t.flags) - ((char *)&t), Interpreter::NUMBER_ID));
+
+}
+void Tile::Construct(void *data) {
+ new (data) Tile;
}
}