diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-08 14:29:25 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-08 14:29:25 +0100 |
commit | 63bcd54e0e0ea64cfef5950568b4253d5dae5c1e (patch) | |
tree | 24f1f251259ca46566a4694b765dc4e99ee264ab /src/crepe/api/Sprite.h | |
parent | 5c3ce63558f2d5dec06a124773f910d783bb22aa (diff) |
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
Diffstat (limited to 'src/crepe/api/Sprite.h')
-rw-r--r-- | src/crepe/api/Sprite.h | 5 |
1 files changed, 3 insertions, 2 deletions
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; |