#ifndef _fencer_sprite_h
#define _fencer_sprite_h

#include "vmath.h"
#include "transform.h"
#include "spritesheet.h"
#include <SDL2/SDL_render.h>
#include <SDL2/SDL_rect.h>

// Forward declaration of the private sprite struct
typedef struct Sprite Sprite;

extern Sprite* sprite_new_empty();
extern Sprite* sprite_from_spritesheet(Spritesheet* sheet, size_t initial_frame);
extern void sprite_destroy(Sprite* sprite);

extern void sprite_draw(Sprite* self, Transform transform);

extern Vector sprite_get_origin(Sprite* self);
extern void sprite_set_origin(Sprite* self, Vector origin);

extern size_t sprite_get_tile(const Sprite* self);
extern void sprite_set_tile(Sprite* self, size_t tile);

extern Spritesheet* sprite_get_spritesheet(const Sprite* self);
extern void sprite_set_spritesheet(Sprite* self, Spritesheet* spritesheet);

extern void sprite_flip_horizontal(Sprite* self, int horizontal);
extern void sprite_flip_vertical(Sprite* self, int vertical);

#endif // !_fencer_sprite_h
