#pragma once #include #include "Gal.hpp" struct TextureData { std::vector data; //expected format RGBA8888 int width, height; }; struct TextureCoord { double x, y, w, h; int pixelX, pixelY, pixelW, pixelH; size_t layer; }; class TextureAtlas { std::shared_ptr texture; std::vector textureCoords; public: TextureAtlas(std::vector &textures); std::shared_ptr GetGalTexture() { return texture; } TextureCoord GetTexture(int id) { return textureCoords[id]; } };