Load image directly

Co-authored-by: Celtic Minstrel <CelticMinstrel@users.noreply.github.com>
This commit is contained in:
2025-07-31 19:57:52 -05:00
parent 449828e2af
commit baa85ab9b3

View File

@@ -4249,9 +4249,7 @@ public:
}
// Get image data from sheets not in memory
else{
sf::Texture texture;
texture.loadFromFile((pic_dir/("sheet" + std::to_string(idx) + ".png")).string());
sheets[idx] = texture.copyToImage();
sheets[idx].loadFromFile((pic_dir/("sheet" + std::to_string(idx) + ".png")).string());
}
}