4 * Created on: Sep 5, 2012
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
17 void Animation::AddFields(TypeDescription &td, const Animation &a, std::ptrdiff_t offset, int boolId, int numberId, int spriteId) {
18 td.AddField("sprite", FieldDescription(((char *)&a.sprite) - ((char *)&a) - offset, spriteId).SetReferenced().SetDescription("the sprite used for cutting out frames"));
19 td.AddField("frametime", FieldDescription(((char *)&a.frameTime) - ((char *)&a) - offset, numberId).SetDescription("duration of a frame in miliseconds"));
20 td.AddField("repeat", FieldDescription(((char *)&a.repeat) - ((char *)&a) - offset, boolId).SetDescription("whether the animation should start over at the beginning after reaching the last frame"));