summaryrefslogtreecommitdiff
path: root/sprite.cpp
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-12-31 09:23:28 +0100
committertomsmeding <tom.smeding@gmail.com>2016-12-31 09:23:28 +0100
commit8023d607f128ef4b4e63b833fc2045f7b41a1e3f (patch)
tree6c44c2628c5f36a1564c9010d25ae37ed1b4e3ce /sprite.cpp
parent0cc504d3aa972cc8d5d501d9278e8773a810985a (diff)
SFML sprites!
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);
+}