diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-12-31 09:23:28 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-12-31 09:23:28 +0100 |
commit | 8023d607f128ef4b4e63b833fc2045f7b41a1e3f (patch) | |
tree | 6c44c2628c5f36a1564c9010d25ae37ed1b4e3ce /sprite.cpp | |
parent | 0cc504d3aa972cc8d5d501d9278e8773a810985a (diff) |
SFML sprites!
Diffstat (limited to 'sprite.cpp')
-rw-r--r-- | sprite.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); +} |