From 5b6986f617c554ac27b57373be0b874807e2d49d Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 7 Jan 2015 15:05:59 +0100 Subject: do not duplicate surfaces but make them point to each other There is no need to reopen the bitmap files each time we need a new paladin or priest or whatever. Instead, just load them at startup and them make them point to the good destination. Signed-off-by: Olivier Gayot --- main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index e6fc307..3167cb0 100644 --- a/main.c +++ b/main.c @@ -298,10 +298,7 @@ void Fdechargerimages (SURFACES *surfaces)//dechargement des surfaces alouées SDL_FreeSurface(surfaces->Ppmcible); SDL_FreeSurface(surfaces->Ppvpersos); SDL_FreeSurface(surfaces->Ppmpersos); - for(i = 0;i < 3;i++) - { - SDL_FreeSurface(surfaces->Tperso[i]); - } + for(i=0;i<3;i++) { SDL_FreeSurface (surfaces->Pnomactions[i]); -- cgit v1.2.3