From d75f0dfb7a040ff88c39e01fa639ff74300f11a2 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 8 Jan 2015 18:52:14 +0100 Subject: blit the background only once (no need for a weird function) Signed-off-by: Olivier Gayot --- jouer.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'jouer.c') diff --git a/jouer.c b/jouer.c index 9081357..9cad17c 100644 --- a/jouer.c +++ b/jouer.c @@ -246,12 +246,7 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, struct team_t *t1, struct unsigned int gagne,perdu; - if(surfaces->Pfondjeu!=NULL) - { - SDL_FreeSurface(surfaces->Pfondjeu); - surfaces->Pfondjeu=NULL; - } - Fblitterfond(surfaces); // on blit le fond du jeu + SDL_BlitSurface(surfaces->background, NULL, surfaces->Pecran, NULL); /* compute whether the allies or the enemies should begin */ playing_team = (rand() % 2) ? t1 : t2; -- cgit v1.2.3