diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 15:05:59 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 15:05:59 +0100 |
commit | 5b6986f617c554ac27b57373be0b874807e2d49d (patch) | |
tree | f3149809f78dd31ec091d95d78f466ea058d3cbc /main.c | |
parent | 7a9de9f475fcf4ba3cc4b5b6ef6b220af1c7d7bd (diff) |
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 <duskcoder@gmail.com>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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]); |