Hum, in fact there are many errors in your code
void Map::loadAllImages()
{
//Create Sprite
Sprite blockTile(blockImage);
Sprite groundTile(groundImage);
Sprite wallTile(wallImage);
}
Here you just create temporary sprites using your images. These sprites will be destroyed when the function returns, so it's basically doing nothing at all. I guess you want to load your images from files?
void Map::loadAllImages()
{
if (!blockImage.LoadFromFile("path/to/block-image") ||
!groundImage.LoadFromFile("path/to/ground-image") ||
!wallImage.LoadFromFile("path/to/wall-image"))
{
// error...
}
}
Then you inherit from Sprite but you never use your base class. My advice would be to avoid inheriting from sf::Sprite to start. Just have a sprite as a member, and create a function to draw your map. This is what you tried to do with updateMap, all you have to do is to pass a reference to the window because you'll need it to draw something.
void Map::draw(sf::RenderWindow& window)
{
//Scroll through level and display corresponding image of tile
for(int y = 0; y < 12; y++)
{
for(int x = 0; x < 12; x++)
{
num = level[y][x];
if(num == '1')
{
this->sprite.SetPosition(x*50, y*50);
this->sprite.SetImage(blockImage);
}
else if(num == '2')
{
this->sprite.SetPosition(x*50, y*50);
this->sprite.SetImage(groundImage);
}
else if(num == '3')
{
this->sprite.SetPosition(x*50, y*50);
this->sprite.SetImage(wallImage);
}
window.Draw(this->sprite);
}
}
}
// In your main:
map.draw(App);
When everything works, I suggest that you create one sprite per tile rather than reusing a single sprite to draw them all. This is more efficient, you only need to set the position/image/etc of tiles once rather than every time you draw them.