Torches are now flipped, but next is that same crash.

This commit is contained in:
Zed A. Shaw 2026-02-13 11:10:13 -05:00
parent 0e8b661273
commit 2484802d93
7 changed files with 23 additions and 32 deletions

View file

@ -18,15 +18,12 @@ namespace scene {
textures::SpriteTexture st;
animate2::Animate2 anim;
std::string cell;
float scale_x = 1.0f;
float scale_y = 1.0f;
float x = 0;
float y = 0;
sf::Vector2f scale{1.0f, 1.0f};
sf::Vector2f pos{0.0f, 0.0f};
bool at_mid=false;
bool flipped=false;
std::shared_ptr<sf::Shader> effect = nullptr;
sf::Text text;
sf::Vector2f pos{0,0};
};
struct Engine {
@ -47,7 +44,7 @@ namespace scene {
void attach_text(const std::string& actor, const std::string& text);
Element config_scene_element(nlohmann::json& config, bool and_play, bool duped);
sf::Vector2f position_sprite(textures::SpriteTexture& st, const std::string& cell_name, float scale_x, float scale_y, bool at_mid, float x_diff=0.0f, float y_diff=0.0f);
sf::Vector2f position_sprite(textures::SpriteTexture& st, const std::string& cell_name, sf::Vector2f scale, bool at_mid, float x_diff=0.0f, float y_diff=0.0f);
void move_actor(const std::string& actor, const std::string& cell_name);
void animate_actor(const std::string& actor);