This function is used update the sprite following the animation management. Animation DO NOT manage the time !
void dg_animation_update_sprite(dg_dg_animation_t *animation, sfSprite *sprite, int i);
dg_animation_add(animation, 2);
void dg_animation_update_sprite(dg_dg_animation_t *animation, sfSprite *sprite, int i)
{
dg_spritesheet_t *sheet = animation->sheet;
int frame = animation->frames[(int)(i % animation->size)];
dg_spritesheet_to_sprite(sheet, sprite, frame);
}