Cool story, but code.show(); would be much better... ![Grin ;D](https://www.sfml-dev.org/forums/Smileys/default/grin.gif)
No seriously the description isn't bad, but it doesn't really help that much. If you want a good answer you need to provide a minimal and complete example that reproduces the problem.
I can now only give you some points:
.SetImage
I strongly advice you against the use of SFML 1.6, it's around 2.5 years old, thus outdated, has a lot of bugs and misses quite a few nice features.
I have a class, within that class contains a Sprite and an Image
Usually it's not such a good idea to pair Sprites and Images, because Images are heavy resource objects that shouldn't be copied around but could also get used multiple times.
Anyway, I have an init function. This function is called to initiate all the good stuffs including setting the image for the sprite.
Classes have constructors for a reason. The job of a constructor is to fully initialize the object and it's member variables, having a (public) init function often shows already a bad design.
The function takes a pointer to the Render Window and then uses it to draw the sprite (held within the class).
The overall design is not exactly clear here, but I'd say a pointer is unnecessary and a reference would do the trick too.
Although, when I draw like this, it shows as a white box. In order to draw correctly, before I draw I must set the image once again.
This sounds like the Image gets moved in memory between setting the Image to the Sprite and drawing the Sprite, thus the reference the Sprite holds is invalid. But without code it's impossible to tell.
I have done lots of problem testing and found out its not an obvious fault in my code (as in it is indeed being called and indeed being drawn correctly).
Well C++ is quite complex and one has to learn a lot, even after years of programming with it. But I guess the problem here, is just a not so nice code design plus a small lack of knowledge in C++ basics.
P.P.S. if it helps, the classes that do this are stored within a std::vector<--class-->.
Go on... (= show code). ![Cheesy :D](https://www.sfml-dev.org/forums/Smileys/default/cheesy.gif)
1) That's interesting. When I went on SFML I clicked download current version. Does that happen to be 1.6? I shall update!
2) So shall I create an imageHolder (or something) class (or struct, which would be better?) that contains instances of all images?
3) Yes, but the init function takes arguments. I don't think constructors can take arguments. Is it a better idea to just use a ton of getter and setter functions?
4) Elaborate?
5) Ok, I shall provide code. I was avoiding doing that because i'd have to strip down a ton of unrelated stuff from the main.cpp and the enemy.h and enemy.cpp and stage.h and stage.cpp, which would take some time since they're all huge, and I wanted to avoid taking this much time if by any chance it wasn't necessary.
6) I meant, I'm logging when things happen, to make sure they happen, and it is indeed happening, therefore the function of drawing and setting image is being called at the very least. Also, forgive me, I'm a nooblet at C++, but I have quite a bit of Python experience which is much easier
![Tongue :P](https://www.sfml-dev.org/forums/Smileys/default/tongue.gif)
7) Code below
http://pastebin.com/712QvpdAIf you need to see any other file please specify. Files are: enemy.h, enemy.cpp, bullethandler.h, bullethandler.cpp, bullet.h, bullet.cpp, stagestats.h, stagestats.cpp, stage.h, stage.cpp, player.h, player.cpp, main.cpp, inputhandler.h, inputhandler.cpp
If you need to know about the design please ask. I would greatly appreciate if you give tips on how I could improve this, and the design of the whole thing. Thanks!