diff options
Diffstat (limited to 'Level.cpp')
-rw-r--r-- | Level.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -25,6 +25,10 @@ void Level::changeLevel(int levelNo) { // Checking where the player is for fun/demonstration purposes std::cout << "Level::changeLevel(): player is at " << player.getX() << ", " << player.getY() << ".\n"; + + // Load background image + if (!(background = loadImage("space.png"))) + std::cout << "Level::changeLevel: Error loading background image.\n"; } void Level::move() { @@ -33,4 +37,6 @@ void Level::move() { void Level::draw(Screen *screen) { //std::cout << "Level::draw(): Drawing into the screen.\n"; + // Blit background + screen->blit(0, 0, background); } |