Now I'm like John Snow; I know nothing.
I was tired of keeping trying to make that code work. As I wrote yesterday, I've made some changes and compiled the project. Once again I saw white squares and as I had a hard day I haven't time to write code. Today I entered the forum, saw your post and tought "Great idea, let's see how it works!". So I, making no changes from yesterday, debugged code and started a "new game". Everything was set up in it's place, displayed fullly properly. I have no idea why it didn't worked yesterday
All in all thank you all for your time you spended here reading my sh*tty code and trying to help me. Now I know more about SFML and object oriented programing in C++. Thakns to you I started reading some more materials about both and I find it really helpful so far.
The solution to the problem for all that could look for this in the future:1. Ensure that you don't move your Texture objects in memory after calling
sprite.setTexture(texture);.
2. If you do you can do two things:
a) change the code to don't move the Texture
b) change the code to call
sprite.setTexture(texture); always right after moving the Texture
In my opinion the case is closed, if I had some problems with it in the future I'll probably be able to handle with it on my own (thanks to you ofc
).
You guys are awesome! Thank you once again for what you did for me, for your patience and nerves
Best regards,
Skorpion