Can indicate that a animation is flipped, which will *-1 on the x.

This commit is contained in:
Zed A. Shaw 2025-10-27 23:54:31 -04:00
parent c4fcb41c34
commit 2ecd8528ea
7 changed files with 45 additions and 13 deletions

View file

@ -13,9 +13,11 @@ namespace scene {
float scale_y = config["scale_y"];
float x = config["x"];
float y = config["y"];
bool flipped = config["flipped"];
// BUG: need to make animation optional
auto anim = animation::load(sprite_name);
anim.flipped = flipped;
if(and_play) anim.play();
std::string cell = config["cell"];
@ -23,7 +25,7 @@ namespace scene {
bool at_mid = config["at_mid"];
return {name, st, anim, cell, scale_x, scale_y, x, y, at_mid};
return {name, st, anim, cell, scale_x, scale_y, x, y, at_mid, flipped};
}
Engine::Engine(components::AnimatedScene& scene) :