diff options
Diffstat (limited to 'menuchoixpersos.c')
-rw-r--r-- | menuchoixpersos.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/menuchoixpersos.c b/menuchoixpersos.c index 7a66c3f..d22ce58 100644 --- a/menuchoixpersos.c +++ b/menuchoixpersos.c @@ -77,6 +77,11 @@ struct team_t *new_ally_team(SURFACES *surfaces, init_team_players(team, true, classes, surfaces); + /* TODO remove when the level is set */ + for (int i = 0; i < team->chr_cnt; ++i) { + team->chrs[i].ally.nv = 0; + } + return team; } @@ -136,7 +141,6 @@ void Fmenuchoixpersos (SURFACES *surfaces, POSITIONS *positions) struct team_t *ally_team; struct team_t *enemy_team; enum character_class_t chr_classes[3]; - ENNEMIS ennemis[5]; SDL_Event event; int Vnbperso = 0; @@ -219,8 +223,8 @@ void Fmenuchoixpersos (SURFACES *surfaces, POSITIONS *positions) TTF_CloseFont (police); SDL_Flip(surfaces->Pecran); ally_team = new_ally_team(surfaces, chr_classes, 3); - Fmap(surfaces,positions, ally_team,ennemis); enemy_team = new_enemy_team(surfaces, ally_team); + Fmap(surfaces,positions, ally_team, enemy_team); } void Fchangersurlignage2 (int Vchoix, SURFACES *surfaces, POSITIONS *positions) @@ -237,22 +241,3 @@ void Fchangersurlignage2 (int Vchoix, SURFACES *surfaces, POSITIONS *positions) SDL_BlitSurface (surfaces->Ptextechoixmenu,NULL,surfaces->Pecran,&positions->Vpositiontextemenu); SDL_Flip (surfaces->Pecran); } - -void Fremplirennemis (SURFACES *surfaces,int Vnbennemis,ENNEMIS ennemis[]) -{ - - int i; - for (i=0;i<=Vnbennemis;i++) - { - if (ennemis[i].classe==GUERRIER_GOBELIN) - surfaces->Tennemi[i]=surfaces->Pgobelin; - } -} - -int Fcalculernbennemis () -{ - int nb; - nb=(rand()%(4-0+1))+0; - return nb; -} - |