summaryrefslogtreecommitdiff
path: root/sprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sprite.cpp')
-rw-r--r--sprite.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sprite.cpp b/sprite.cpp
index e3503ea..260c54f 100644
--- a/sprite.cpp
+++ b/sprite.cpp
@@ -2,4 +2,7 @@
Sprite::Sprite(const unsigned char *image,unsigned int image_len)
- :image(image),image_len(image_len)/*,fl_image(nullptr)*/{}
+ :image(image),image_len(image_len){
+ sf_texture.loadFromMemory(image,image_len);
+ sf_sprite.setTexture(sf_texture);
+}