LDtk import support

This commit is contained in:
John McCardle 2026-02-07 11:30:32 -05:00
commit de7778b147
24 changed files with 26203 additions and 0 deletions

View file

@ -25,6 +25,11 @@ public:
// #144: Factory method to create texture from rendered content (snapshot)
static std::shared_ptr<PyTexture> from_rendered(sf::RenderTexture& render_tex);
// Factory method to create texture from an sf::Image (for LDtk flip-baked atlases)
static std::shared_ptr<PyTexture> from_image(
const sf::Image& img, int sprite_w, int sprite_h,
const std::string& name = "<generated>");
sf::Sprite sprite(int index, sf::Vector2f pos = sf::Vector2f(0, 0), sf::Vector2f s = sf::Vector2f(1.0, 1.0));
int getSpriteCount() const { return sheet_width * sheet_height; }