COMPLETER LA CLASSE ABSTRAITE

This commit is contained in:
YANNIS
2025-06-01 10:34:29 +02:00
parent 90c5485fc5
commit cfee2379ab
6 changed files with 29 additions and 4 deletions
+7
View File
@@ -7,6 +7,12 @@ Game::Game(){
std::string(SDL_GetError()));
}
if (IMG_Init(IMG_INIT_PNG) == 0) {
SDL_Quit();
throw std::runtime_error("SDL_image could not initialize! IMG_Error: " + \
std::string(IMG_GetError()));
}
_window = SDL_CreateWindow("Bomberman", \
SDL_WINDOWPOS_CENTERED, \
SDL_WINDOWPOS_CENTERED, \
@@ -34,6 +40,7 @@ Game::~Game() {
if (_window) {
SDL_DestroyWindow(_window);
}
IMG_Quit();
SDL_Quit();
}