From adceeb1192fdd1d14e0f55219bbd1bcb14eacc05 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 8 Jan 2015 12:46:36 +0100 Subject: use the objects assigned to the teams instead of a common array Signed-off-by: Olivier Gayot --- blits.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'blits.c') diff --git a/blits.c b/blits.c index eff5c4d..318e72f 100644 --- a/blits.c +++ b/blits.c @@ -152,7 +152,7 @@ void Fchangercurseurpersos (SURFACES *surfaces, POSITIONS *positions, struct cha TTF_CloseFont(police); } -void Fchangeractionselectionnee(SURFACES *surfaces, POSITIONS *positions,int selection,int page,int nbactions,int type,OBJET *objets) +void Fchangeractionselectionnee(SURFACES *surfaces, POSITIONS *positions,int selection,int page,int nbactions,int type) { int i; TTF_Font *police=NULL; @@ -216,22 +216,26 @@ void Fchangeractionselectionnee(SURFACES *surfaces, POSITIONS *positions,int sel ECRIRE("POTION",0); ECRIRE("ETHER",1); ECRIRE("POTION +",2); - sprintf(chaine[0],"%d",objets->potions); +#if 0 + sprintf(chaine[0],"%d", ally->objects.potions); surfaces->Pquantite[0]=TTF_RenderText_Blended(police,chaine[0],couleur); - sprintf(chaine[1],"%d",objets->ethers); + sprintf(chaine[1],"%d", ally->objects.ethers); surfaces->Pquantite[1]=TTF_RenderText_Blended(police,chaine[1],couleur); - sprintf(chaine[2],"%d",objets->potionsplus); + sprintf(chaine[2],"%d", ally->objects.potionsplus); surfaces->Pquantite[2]=TTF_RenderText_Blended(police,chaine[2],couleur); SDL_BlitSurface(surfaces->Pquantite[0],NULL,surfaces->Pecran,&positions->Vpositionquantite[0]); SDL_BlitSurface(surfaces->Pquantite[1],NULL,surfaces->Pecran,&positions->Vpositionquantite[1]); SDL_BlitSurface(surfaces->Pquantite[2],NULL,surfaces->Pecran,&positions->Vpositionquantite[2]); +#endif } else if(page==1) { ECRIRE("ETHER +",0); - sprintf(chaine[0],"%d",objets->ethersplus); +#if 0 + sprintf(chaine[0],"%d", ally->objects.ethersplus); surfaces->Pquantite[0]=TTF_RenderText_Blended(police,chaine[0],couleur); SDL_BlitSurface(surfaces->Pquantite[0],NULL,surfaces->Pecran,&positions->Vpositionquantite[0]); +#endif } } if (page==nbactions/3) -- cgit v1.2.3