Now the Animation system is no more. Next is cleaning up the quick hacks I needed to finally get rid of it, like animate2::has.

This commit is contained in:
Zed A. Shaw 2026-02-23 23:41:14 -05:00
parent b504afef2a
commit 89ca204f3d
15 changed files with 356 additions and 423 deletions

View file

@ -11,7 +11,7 @@
#include "textures.hpp"
#include "systems.hpp"
#include "shaders.hpp"
#include "animation.hpp"
#include "animate2.hpp"
using namespace fmt;
using std::make_unique, std::shared_ptr;
@ -202,12 +202,13 @@ void Raycaster::sprite_casting(sf::RenderTarget &target) {
effect->setUniform("darkness", level);
}
animation::step_animation(*world, rec.entity, scale, position, in_texture);
sf_sprite->setScale(scale);
sf_sprite->setPosition(position);
animate2::step_animation(*world, rec.entity, *sf_sprite);
sf_sprite->setOrigin(origin);
sf_sprite->setScale(scale);
sf_sprite->setTextureRect(in_texture);
sf_sprite->setPosition(position);
target.draw(*sf_sprite, effect.get());
}