#include #include #include "../util/Log.h" #include "Component.h" #include "Sprite.h" #include "Texture.h" #include "types.h" using namespace std; using namespace crepe; Sprite::Sprite(game_object_id_t id, Texture & texture, const Sprite::Data & data) : Component(id), texture(std::move(texture)), data(data) { dbg_trace(); this->mask.w = this->texture.get_size().x; this->mask.h = this->texture.get_size().y; this->aspect_ratio = static_cast(this->mask.w) / this->mask.h; } Sprite::~Sprite() { dbg_trace(); }