From 63bcd54e0e0ea64cfef5950568b4253d5dae5c1e Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Sun, 8 Dec 2024 14:29:25 +0100 Subject: removed singleton from SDLContext, problem now is cannot call functionalities in the constructor sprite and animator and texture because it can only be filled at rendersystem call --- src/crepe/api/Sprite.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/crepe/api/Sprite.h') diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h index dbf41e4..ec120c0 100644 --- a/src/crepe/api/Sprite.h +++ b/src/crepe/api/Sprite.h @@ -4,6 +4,7 @@ #include "Color.h" #include "Texture.h" +#include "api/Asset.h" #include "types.h" namespace crepe { @@ -74,11 +75,11 @@ public: * \param texture asset of the image * \param ctx all the sprite data */ - Sprite(game_object_id_t id, Texture & texture, const Data & data); + Sprite(game_object_id_t id, const Asset & texture, const Data & data); ~Sprite(); //! Texture used for the sprite - const Texture texture; + const Asset source; Data data; -- cgit v1.2.3