// To see prcisely what this toggle does, just comment the line and recompile
// the code...
SDL_EnableKeyRepeat(25, 20);
-}
-Game::Game(SDL_Surface* screen) : mCurrentLevel(0), mScreen(screen)
-{
+ // Create the first level
+ mLevels.push_back(new Level(mScreen));
}
Game::~Game()
{
+ for (size_t i = 0; i < mLevels.size(); ++i) {
+ delete mLevels[i];
+ }
}
Level* Game::getCurrentLevel()
mBackground = LoadImage("Backgrounds/bg.bmp");
}
+Level::~Level()
+{
+}
+
void Level::DrawIMG(SDL_Surface *img, int x, int y)
{
SDL_Rect dest;