Now I can attach arbitrary shaders to sprites based on things that happen in the world.

This commit is contained in:
Zed A. Shaw 2025-04-20 00:09:56 -04:00
parent bec8fe0a13
commit 787be78a69
6 changed files with 53 additions and 16 deletions

View file

@ -4,6 +4,7 @@
#include "dinkyecs.hpp"
#include "point.hpp"
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/Shader.hpp>
#include <SFML/System/Vector2.hpp>
#include <functional>
#include <optional>
@ -15,6 +16,11 @@
namespace components {
using namespace nlohmann;
struct SpriteEffect {
int frames;
std::shared_ptr<sf::Shader> effect;
};
struct Position {
Point location;
};