COMPLETER LA CLASSE ABSTRAITE
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user