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

correction d'une erreur dans classes.xml - Desormais on peut rajouter une classe personnalisee

parent f7243b34
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -74,6 +74,6 @@
</Skill>
</Skills>
<Skin id="SP_ARCHER" f_default="../resources/Skins/archer.bmp" f_selected="../resources/Skins/archer_selected.bmp" f_healed="../resources/Skins/archer_healed.bmp" f_damaged="../resources/Skins/archer_damaged.bmp">
<Skin>
</Skin>
</Classe>
</Classes>
......@@ -70,7 +70,8 @@ char* afficherListe(char** nomsClasses, char** skinsClasses, int nbChoix, TTF_Fo
switch(event.type)
{
case SDL_QUIT:
quitter=1;
SDL_FreeSurface(fenetre);
return "fermer";
break;
case SDL_MOUSEBUTTONDOWN:
for(i=0;i<nbChoix;i++)
......@@ -322,8 +323,12 @@ int SDL_bis()
}
if(j!=0&&p!=0){
classeChoisie=afficherListe(obtenirNomsClasses(), obtenirSkinsClasses(), nbClasses(), police, couleurBlanche);
numClassePerso[p-1][j-1]=ajouterPersonnage(classeChoisie, p-1, j);
if(classeChoisie!="fermer")
{
numClassePerso[p-1][j-1]=ajouterPersonnage(classeChoisie, p-1, j);
}
ecran = SDL_SetVideoMode(LARGEUR_CARTE*(LARGEUR_CASE+1), HAUTEUR_CARTE*(HAUTEUR_CASE+2), 32, SDL_HWSURFACE|SDL_DOUBLEBUF);
}
break;
default:
......@@ -353,6 +358,6 @@ int SDL_bis()
j=0;
num_classe=-1;
}
SDL_Quit();
return 0;
}
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