diff --git a/src/SDL_bis.c b/src/SDL_bis.c index 84b2bfdd56e45109c92e88bfcdbefb425e4ed43e..c389ca081f5f1afbaad2303cef0144459b4c5963 100644 --- a/src/SDL_bis.c +++ b/src/SDL_bis.c @@ -4,6 +4,7 @@ #include <SDL/SDL_ttf.h> #include "SDL.h" #include "structures.h" +#include "controleur.h" @@ -88,7 +89,6 @@ int SDL_bis() SDL_BlitSurface(rectangle,NULL,ecran,&pos_texte); SDL_Flip(ecran); - while(etat==LANCEMENT) { SDL_WaitEvent(&event); diff --git a/src/controleur.c b/src/controleur.c index 65ec869ec50f856f0ce5a1d15847cebb6de988a5..edc8193a1874a687e6d58d92b0dba65594a6085f 100644 --- a/src/controleur.c +++ b/src/controleur.c @@ -37,7 +37,7 @@ void initJeu(){ Joueur * j = nouveauJoueur(); if(j!=NULL){ setNomJoueur(j,nomDuJoueur); - if(addParticipant(partieGlobale,j)){ + if(addParticipant(partieGlobale,j)==0){ *etat =LANCEMENT; } else{ diff --git a/src/controleur.h b/src/controleur.h index c14fa45f19ab68bff8db563297a9b1ab3c1e8359..0c2a321505ee6eb866cda15fd7aad4c2f4fb02e3 100644 --- a/src/controleur.h +++ b/src/controleur.h @@ -9,6 +9,7 @@ #define CONTROLEUR_H void initJeu(); + void ajouterUnJoueur(char * nomDuJoueur, EtatsJeu * etat); #endif // CONTROLEUR_H