From bdf437cd2e347ad6b51999f615e40c57e37ea3e7 Mon Sep 17 00:00:00 2001 From: Henri Montjoie <henri.montjoie@insa-rennes.fr> Date: Sat, 14 May 2016 14:54:16 +0200 Subject: [PATCH] gestion des PV et des persos terminee --- src/affichage.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/affichage.c b/src/affichage.c index 3697bb1..e45e4f1 100644 --- a/src/affichage.c +++ b/src/affichage.c @@ -666,7 +666,6 @@ int affichage_carte() SDL_Rect Position_Case[HAUTEUR_CARTE][LARGEUR_CARTE]; SDL_Rect Position_Perso[NB_PERSO*NB_JOUEURS]; SDL_Rect Position_Case_brillante; - SDL_Rect position_perso_select; SDL_Surface* PV = NULL; SDL_Surface* texte = NULL; @@ -778,7 +777,7 @@ int affichage_carte() finDuTour(); debutDuTour(); nom_joueur= TTF_RenderText_Shaded(vieille_police, obtenirNomJoueurCourant(), couleurBlanche, couleurNoire); - actualiser_num_perso(perso_actuel); + perso_actuel=actualiser_num_perso(perso_actuel); sprintf(buffer_PV, "%d/%d", obtenirPVPersonnage(perso_actuel),obtenirPVMaxPersonnage(perso_actuel)); PV=TTF_RenderText_Shaded(vieille_police, buffer_PV, couleurBlanche, couleurNoire); } @@ -817,10 +816,7 @@ int affichage_carte() } } - /* - Position_Guerrier_select.x = get_position_case_x(&Position_Perso[persoactuel()]); - Position_Guerrier_select.y = get_position_case_y(&Position_Perso[persoactuel()]); - */ + SDL_FillRect(ecran,NULL,SDL_MapRGB(ecran->format,0,0,0)); for(i=0; i<LARGEUR_CARTE; i++) { @@ -833,7 +829,7 @@ int affichage_carte() { SDL_BlitSurface(persos[i],NULL,ecran,&Position_Perso[i]); } - /*SDL_BlitSurface(Guerrier_select,NULL,ecran,&Position_Guerrier_select);*/ + SDL_BlitSurface(perso_select,NULL,ecran,&Position_Perso[perso_actuel-1]); SDL_BlitSurface(Case_brillante,NULL,ecran,&Position_Case_brillante); SDL_BlitSurface(PV,NULL,ecran,&pos_PV); SDL_BlitSurface(texte,NULL,ecran,&pos_texte); -- GitLab