summaryrefslogtreecommitdiff
path: root/blits.c
diff options
context:
space:
mode:
Diffstat (limited to 'blits.c')
-rw-r--r--blits.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/blits.c b/blits.c
index d7b14e1..696228e 100644
--- a/blits.c
+++ b/blits.c
@@ -26,12 +26,8 @@ void Fblitterpersos (SURFACES *surfaces, POSITIONS *positions, PERSONNAGES perso
int i;
for(i=0;i<3;i++)
{
- if(persos[i].classe==PALADIN)
- SDL_BlitSurface(surfaces->Ppaladin,NULL,surfaces->Pecran,&positions->Vpositionpersos[i]);
- else if(persos[i].classe==PRETRE)
- SDL_BlitSurface (surfaces->Ppretre,NULL,surfaces->Pecran,&positions->Vpositionpersos[i]);
- else if(persos[i].classe==VOLEUR)
- SDL_BlitSurface(surfaces->Pvoleur,NULL,surfaces->Pecran,&positions->Vpositionpersos[i]);
+ SDL_BlitSurface(surfaces->Tperso[i], NULL, surfaces->Pecran, &positions->Vpositionpersos[i]);
+
if(persos[i].etat==MORT)
{
positions->Vpositionmort.x=positions->Vpositionpersos[i].x+surfaces->Tperso[i]->w/2-surfaces->Pmort->w/2;
@@ -378,6 +374,23 @@ void highlight_current_character(SURFACES* surfaces, PERSONNAGES persos[], int c
}
}
+void unhighlight_prev_character(SURFACES *surfaces, PERSONNAGES persos[], int character_idx)
+{
+ switch (persos[character_idx].classe) {
+ case PALADIN:
+ surfaces->Tperso[character_idx] = surfaces->Ppaladin;
+ break;
+ case PRETRE:
+ surfaces->Tperso[character_idx] = surfaces->Ppretre;
+ break;
+ case VOLEUR:
+ surfaces->Tperso[character_idx] = surfaces->Pvoleur;
+ break;
+ default:
+ abort();
+ }
+}
+
void Fblitcoloredselection (SURFACES surfaces[],POSITIONS positions[],int Vtourallie,PERSONNAGES persos[])
{
SDL_BlitSurface(surfaces->Tperso[Vtourallie],NULL,surfaces->Pecran,&positions->Vpositionpersos[Vtourallie]);