This is a small class that aim to help with the animation of sprite with sfml Can be easily adapted to CSFML The main show a little exemple on how to use it
The main class is mEntity, you can initialize it like this
mEntity entity("sprite.png", {22, 187, 17, 29}, 120, 6, LEFT_TO_RIGHT, "walk");
entity.addAnimationLoop("idle", 3, 500, {21, 68, 16, 23});
The animations are saved and can be call later on the program
entity.changeAnimationLoop("walk");