25 lines
549 B
C++
25 lines
549 B
C++
|
#ifndef HOLESOME_SPRITE_SHEET_HPP
|
||
|
#define HOLESOME_SPRITE_SHEET_HPP
|
||
|
|
||
|
|
||
|
#include <memory>
|
||
|
#include <SFML/Graphics/Texture.hpp>
|
||
|
#include <SFML/Graphics/Sprite.hpp>
|
||
|
#include "animated_sprite.hpp"
|
||
|
|
||
|
class SpriteSheet
|
||
|
{
|
||
|
public:
|
||
|
SpriteSheet(const std::shared_ptr<sf::Texture>& texture, int columns, int rows);
|
||
|
|
||
|
sf::Sprite getSprite(int sequenceIndex) const;
|
||
|
|
||
|
std::shared_ptr<AnimatedSprite> getAnimation(int startingSequenceIndex, int numberOfFrames) const;
|
||
|
|
||
|
private:
|
||
|
std::vector<sf::Sprite> sprites;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //HOLESOME_SPRITE_SHEET_HPP
|