<commit_before>#ifndef ANIMATEDIMAGE_H
#define ANIMATEDIMAGE_H

#include <vector>
#include <string>
#include <SDL.h>
#include <luabind/luabind.hpp>
#include "base.h"
#include "image.h"
#include "timer.h"

///Describes an animation sequence
struct AnimationSequence {
	/**
	*  Save the sequence to a Json::Value
	*  @return The sequence information as a Json::Value
	*/
	Json::Value Save();
	/**
	*  Load the sequence from a Json::Value
	*  @param val The Json::Value to load from
	*/
	void Load(Json::Value val);
	///The clips in the animated image clip array
	std::vector<int> clipIndices;
	///The framerate to play the animation at
	double frameRate;
	///The sequence name
	std::string name;
};
///An image that can store and play animation sequences
/**
*  Used for storing and playing animation sequences,
*  inherits from Image
*/
class AnimatedImage : public Image {
public:
    AnimatedImage();
    /**
    *  Setup the AnimatedImage class, if a filename is passed load the image
    *  @param file The filename
    *  @see Window::LoadImage for the loading function
    */
    AnimatedImage(const std::string &file);
	~AnimatedImage();
	/**
	*  Update the animation, called every frame
	*/
	void Update();
	/**
	*  Play the desired animation
	*  @param name The animation name to play<commit_msg>re-ordered some functions<commit_after>#ifndef ANIMATEDIMAGE_H
#define ANIMATEDIMAGE_H

#include <vector>
#include <string>
#include <SDL.h>
#include <luabind/luabind.hpp>
#include "base.h"
#include "image.h"
#include "timer.h"

///Describes an animation sequence
struct AnimationSequence {
	/**
	*  Save the sequence to a Json::Value
	*  @return The sequence information as a Json::Value
	*/
	Json::Value Save();
	/**
	*  Load the sequence from a Json::Value
	*  @param val The Json::Value to load from
	*/
	void Load(Json::Value val);
	///The clips in the animated image clip array
	std::vector<int> clipIndices;
	///The framerate to play the animation at
	double frameRate;
	///The sequence name
	std::string name;
};
///An image that can store and play animation sequences
/**
*  Used for storing and playing animation sequences,
*  inherits from Image
*/
class AnimatedImage : public Image {
public:
    /**
    *  Setup the AnimatedImage class, if a filename is passed load the image
    *  @param file The filename
    *  @see Window::LoadImage for the loading function
    */
    AnimatedImage(const std::string &file);
    AnimatedImage();
	~AnimatedImage();
	/**
	*  Update the animation, called every frame
	*/
	void Update();
	/**
	*  Play the desired animation
	*  @param name The animation name to play
{'fraction_non_alphanumeric': 0.11183206106870229, 'fraction_numerical': 0.0, 'mean_word_length': 3.7654545454545456, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7444719', 'n_tokens_mistral': 809, 'n_tokens_neox': 800, 'n_words': 299}