#pragma once #include #include "core/jail/jdraw8.hpp" struct Frame { Uint16 x; Uint16 y; Uint16 w; Uint16 h; }; struct Animacio { std::vector frames; // índexs dins d'Entitat::frames }; struct Entitat { std::vector frames; std::vector animacions; }; class Sprite { public: Sprite(JD8_Surface gfx); virtual ~Sprite() = default; void draw(); Entitat entitat; Uint8 cur_frame = 0; Uint16 x = 0; Uint16 y = 0; Uint16 o = 0; protected: JD8_Surface gfx; Uint8 cycles_per_frame = 1; };