Hi.
First of all, thank you for all the effort of putting together scml-pp.
I'm trying to use the library in my game and I found some bugs along the way.
Bug1:
As far as I can tell void Entity::update(int dt_ms) does not handle
updates that skips two or more keys. So if keys are very close in time
or the application is not calling update very often the wrong key will
be used for drawing.
Bug2:
In both void Entity::draw_tweened_object and void Entity::Bone_Transform_State::rebuild
sprites and bones are tweened between their Mainline references. This is however incorrect as the
references might be pointing to the same key in which case the tweening will be halted.
In Bone_Transform_State::rebuild the line
Animation::Mainline::Key::Bone_Ref* ref2 = nextitem.bone_ref;
should be removed and the line
Animation::Timeline::Key* b_key2 = entity_ptr->getTimelineKey(animation, ref2->timeline, ref2->key);
should be replaced with code that fetches the next Timeline key after b_key1.
I modified getTimelineKey to handle out of index keys and changed the line to
Animation::Timeline::Key* b_key2 = entity_ptr->getTimelineKey(animation, ref1->timeline, ref1->key+1);
My animation renders correctly after this dirty hack.
The logic in Entity::draw_tweened_object needs to be updated in the same way.