- int imageId(TypeDescription::GetTypeId("Image"));
- int vectorId(TypeDescription::GetTypeId("Vector"));
+ td.AddField("image", FieldDescription(((char *)&s.surface) - ((char *)&s), Interpreter::IMAGE_ID).SetReferenced().SetDescription("the image to cut this sprite from"));
+ td.AddField("size", FieldDescription(((char *)&s.size) - ((char *)&s), Interpreter::VECTOR_ID).SetDescription("dimensions of the sprite"));
+ td.AddField("offset", FieldDescription(((char *)&s.offset) - ((char *)&s), Interpreter::VECTOR_ID).SetDescription("offset into the image, top-left corner of the sprite's (0,0) clip"));
+}