From 8023d607f128ef4b4e63b833fc2045f7b41a1e3f Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 31 Dec 2016 09:23:28 +0100 Subject: SFML sprites! --- sprite.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sprite.cpp') 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); +} -- cgit v1.2.3-70-g09d2