int temp;
fin >> temp;
if (temp == 1)
{
if (!Image.LoadFromFile("s596.bmp"))
{
fout << "Error s596.bmp" << std::endl;
}
else
{
fout << "s596.bmp loaded" << std::endl;
}
Sprite[i][j].SetImage(Image);
}
if (temp == 2)
{
if (!Image.LoadFromFile("s543.bmp"))
{
fout << "Error s543.bmp" << std::endl;
}
else
{
fout << "s543.bmp loaded" << std::endl;
}
Sprite[i][j].SetImage(Image);
}
Sprite[i][j].SetPosition(0.f+(32*j), 0.f+(32*i));
I am using this inside a loop whichs aim is to write a array of 32x32px pictures in a nice square using data from file
As you see it reads to temp variable a number from this map file and then in one case shows first picture and in second case second picture. I am new to programming graphic things so correct me if im wrong but i think creating huge amounts of sf::image files would be a waste of RAM so i try to reuse this variable. The problem is that whole square consists of sprites of only one kind (s596.bmp). As you can see I made a nice log but it shows that both types are being loaded and there are no errors in it. Whats the problem?
1) I used search and didnt find solution
2) I changed the error/no error messages to log from polish to english but if its the cause of problems im not gonna use c++ anymore