Made a terrible animation sprite and then did a quick animation test. Won't keep it for now but this shows how it could work.

This commit is contained in:
Zed A. Shaw 2025-01-25 12:02:57 -05:00
parent 0882851b3f
commit 51858ea399
6 changed files with 9 additions and 4 deletions

View file

@ -14,6 +14,7 @@ sf::Image TexturePack::load_image(std::string filename) {
void TexturePack::load_textures() {
Config assets("assets/config.json");
for(string tile_path : assets["textures"]) {
images.emplace_back(load_image(tile_path));
}
@ -25,7 +26,7 @@ void TexturePack::load_textures() {
floor = load_image(assets["floor"]);
ceiling = load_image(assets["ceiling"]);
sf::Texture* sprite_texture = new sf::Texture("assets/evil_eye_test-256.png");
sf::Texture* sprite_texture = new sf::Texture("assets/undead_peasant-spritesheet.png");
sprite_texture->setSmooth(false);
sf::Sprite* sf_sprite = new sf::Sprite(*sprite_texture);
sprites.push_back({4.0, 3.55, 6, sf_sprite, sprite_texture});