Skip to content
Snippets Groups Projects
Commit 75cc7fd3 authored by Taha Belkhiri's avatar Taha Belkhiri
Browse files

ajout ecran joueur mort

parent f6f2b46e
No related branches found
No related tags found
No related merge requests found
......@@ -321,6 +321,19 @@ void drawGame(){
SDL_RenderPresent(renderer);
}
void drawLost(){
SDL_Rect rect;
rect.h = screenDimension.h;
rect.w = screenDimension.w;
rect.x = 0;
rect.y = 0;
SDL_RenderCopy(renderer, backgroundLostTexture, NULL, &rect);
SDL_RenderCopy(renderer, playAgainButtonTexture, NULL, &rect);
SDL_RenderCopy(renderer, quitButtonTexture, NULL, &rect);
SDL_RenderPresent(renderer);
}
void mainLoop(){
createWindow();
initPlayer();
......@@ -432,6 +445,10 @@ void mainLoop(){
}
drawGame();
break;
case LOSE:
drawLost();
break;
}
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment