/***********************************************************
This class will fetch the bitmap and horizontally partition the 
continues animation frames into small sub-bitmaps and store it in a 
vector array.
This class also containes centerX and centreY around with which the sub-bitmaps will 
be rotated and scaled. maxFrameCount will give the maximum number of sub bitmaps 
in the vector array. frameInterval will gives the time difference between each 
successive frame in milliseconds.
************************************************************/
#pragma once
#include <vector>
#include <chrono>
#include <allegro5/allegro_primitives.h>

class Animation
{
	friend class AnimationPack;
	friend class AnimationState;

	ALLEGRO_BITMAP* spriteSheet = nullptr;
	std::vector<ALLEGRO_BITMAP*> animationFrames;

	float centerX = 0.0f;
	float centerY = 0.0f;
	const int maxFrameCount = 0;
	const std::chrono::milliseconds frameInterval;

public:
	Animation(std::string path,int frameCount,std::chrono::milliseconds interval);
	~Animation();
};

