Skip to content
Snippets Groups Projects
Commit 42af171a authored by Montjoie Henri's avatar Montjoie Henri
Browse files

merge

parents cf1dd5ae cb930cc0
No related branches found
No related tags found
No related merge requests found
Pipeline #
resources/Skins/logo.bmp

993 KiB | W: | H:

resources/Skins/logo.bmp

993 KiB | W: | H:

resources/Skins/logo.bmp
resources/Skins/logo.bmp
resources/Skins/logo.bmp
resources/Skins/logo.bmp
  • 2-up
  • Swipe
  • Onion skin
......@@ -86,5 +86,9 @@ char * getNomClasse(Classe * c){
return c->nom;
}
char * getNomAttaques(Classe * c, int i){
return c->attaques[i].nom;
}
......@@ -26,4 +26,6 @@ int getManaMax(Classe * c);
int getPDMax(Classe * c);
char * getNomAttaques(Classe * c, int i);
#endif // CLASSE_H_INCLUDED
......@@ -770,22 +770,33 @@ int obtenirPDMaxPersonnage(int numero){
*
* \return un tableau de chaine de charactères (char**).
*/
/*char ** obtenirNomsAttaquesPersonnage(int numero){
char ** obtenirNomsAttaquesPersonnage(int numero){
//allocation en memoire du tableau de resultats.
int i;
Joueur * actuel = getCurrentJoueur(getListJoueur(partieGlobale));
char ** tabNomsAttPerso = malloc(NB_ATTAQUES_MAX * sizeof(char *));
for(i=0;i<NB_ATTAQUES_MAX;i++){
tabNomsAttPerso[i]= malloc(TAILLE_NOMS*sizeof(char));
}
//Recherche du nom des attaques du Personnage
if((numero>0) && (numero<=3)){
for(i=0;i<NB_ATTAQUES_MAX;i++){
strncpy(tabNomsAttPerso[i],packGlobal.Classes_Package->attaques->nom, TAILLE_NOMS);
}
setOnFirstJoueur(getListJoueur(partieGlobale));
for(i=0;i<NB_ATTAQUES_MAX;i++){
strncpy(tabNomsAttPerso[i], getNomAttaques(getClasse(getPersonnage(getCurrentJoueur(getListJoueur(partieGlobale)),numero-1)),i),TAILLE_NOMS);
}
setOnJoueur(getListJoueur(partieGlobale),actuel);
}
else if ((numero>3)&&(numero>6)){
strncpy(tabNomsAttPerso[i],packGlobal.Classes_Package->attaques->nom, TAILLE_NOMS);
else if ((numero>3)&&(numero<=6)){
setOnFirstJoueur(getListJoueur(partieGlobale));
nextJoueur(getListJoueur(partieGlobale));
for(i=0;i<NB_ATTAQUES_MAX;i++){
strncpy(tabNomsAttPerso[i], getNomAttaques(getClasse(getPersonnage(getCurrentJoueur(getListJoueur(partieGlobale)),numero-4)),i),TAILLE_NOMS);
}
setOnJoueur(getListJoueur(partieGlobale),actuel);
}
return tabNomsAttPerso;
}*/
}
/*!
* \fn void debutDuTour()
......@@ -828,7 +839,7 @@ char * joueurVictorieux(){
// Je met ici mes tests réalisés dans le main pour éviter de les réécrire si jamais il y a un problème.
// Si vous voulez tester aussi, à recopier dans le main avant l'appel à initJeu().
void testControlleurConsole(){
int i,j,n,x,y;
int i,j,n,k,x,y;
EtatsJeu state = SAISIE_JOUEURS;
extern Partie * partieGlobale;
extern Game_Package packGlobal;
......@@ -884,6 +895,10 @@ void testControlleurConsole(){
printf("%d\n", obtenirManaMaxPersonnage(n));
printf("%d\n", obtenirPDPersonnage(n));
printf("%d\n", obtenirPDMaxPersonnage(n));
char ** tabNomAtt = obtenirNomsAttaquesPersonnage(n);
for(k=0;k<NB_ATTAQUES_MAX;k++){
printf("%s\n",tabNomAtt[k]);
}
}
}
}
......
......@@ -135,7 +135,7 @@ typedef struct Attaque{
*/
typedef struct Classe{
char nom[25]; /*!< Nom de la classe de taille TAILLE_NOMS*/
Attaque attaques[5]; /*!< Les attaques disponibles pour la classe*/
Attaque attaques[NB_ATTAQUES_MAX]; /*!< Les attaques disponibles pour la classe*/
unsigned short int points_deplacement_max; /*!< Les PD maximums accordés a la classe*/
unsigned short int PV_max; /*!< Les PV maximums accordés a la classe*/
unsigned short int mana_max; /*!< Le mana maximum accordé a la classe*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment