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

renommage de variables

parent 287df95a
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -110,7 +110,7 @@
<Line>PPPRRRRPPP</Line>
<Line>PPPPRRPPPP</Line>
<Line>PPPPPFPPPP</Line>
<Line>PPPFFFFPPP/Line>
<Line>PPPFFFFPPP</Line>
<Line>FFFFFFFFFF</Line>
<Line>FFFFFFFFFF</Line>
</Map>
......
......@@ -658,16 +658,13 @@ int affichage_carte()
SDL_Rect Position_Guerrier_select;
SDL_Surface* texte = NULL;
SDL_Surface* texte2 = NULL;
SDL_Surface* texte3 = NULL;
SDL_Surface* texte4 = NULL;
SDL_Surface* previsualisation[5]= {NULL};
SDL_Surface* textes[NB_JOUEURS*NB_PERSO]= {NULL};
SDL_Rect pos_bouton;
SDL_Surface* nom_joueur = NULL;
SDL_Surface* bouton1 = NULL;
SDL_Surface* bouton2 = NULL;
SDL_Rect pos_texte;
SDL_Rect pos_texte2;
SDL_Rect pos_texte3;
SDL_Rect pos_texte4;
SDL_Rect pos_nom_joueur;
SDL_Rect pos_bouton1;
SDL_Rect pos_bouton2;
TTF_Font *police = NULL;
TTF_Font *vieille_police = NULL;
SDL_Color couleurNoire = {0, 0, 0};
......@@ -679,19 +676,19 @@ int affichage_carte()
police=TTF_OpenFont("../resources/fonts/arial.ttf",27);
texte= TTF_RenderText_Shaded(vieille_police, "Joueur actuel :", couleurBlanche,couleurNoire);
texte2= TTF_RenderText_Shaded(vieille_police, nom_1, couleurBlanche, couleurNoire);
texte3= TTF_RenderText_Shaded(vieille_police, "Perso suivant", couleurDoree, couleurBleue);
texte4= TTF_RenderText_Shaded(vieille_police, "Joueur suivant", couleurDoree, couleurBleue);
nom_joueur= TTF_RenderText_Shaded(vieille_police, nom_1, couleurBlanche, couleurNoire);
bouton1= TTF_RenderText_Shaded(vieille_police, "Perso suivant", couleurDoree, couleurBleue);
bouton2= TTF_RenderText_Shaded(vieille_police, "Joueur suivant", couleurDoree, couleurBleue);
pos_texte.x=ecran->w-(LARGEUR_BORDURE+texte->w)/2;
pos_texte.y=20;
pos_texte2.x=ecran->w-(LARGEUR_BORDURE+texte2->w)/2;
pos_texte2.y=pos_texte.y+(3*texte->h)/2;
pos_texte4.x=ecran->w-(LARGEUR_BORDURE+texte4->w)/2;
pos_texte4.y=ecran->h-texte4->h-40;
pos_texte3.x=ecran->w-(LARGEUR_BORDURE+texte3->w)/2;
pos_texte3.y=pos_texte4.y-(2*texte4->h);
pos_nom_joueur.x=ecran->w-(LARGEUR_BORDURE+nom_joueur->w)/2;
pos_nom_joueur.y=pos_texte.y+(3*texte->h)/2;
pos_bouton2.x=ecran->w-(LARGEUR_BORDURE+bouton2->w)/2;
pos_bouton2.y=ecran->h-bouton2->h-40;
pos_bouton1.x=ecran->w-(LARGEUR_BORDURE+bouton1->w)/2;
pos_bouton1.y=pos_bouton2.y-(2*bouton2->h);
for(i=0; i<LARGEUR_CARTE; i++)
{
......@@ -766,9 +763,15 @@ int affichage_carte()
etat=FERMER;
break;
case SDL_MOUSEBUTTONDOWN:
//deplacement_personnage(event.button.x,event.button.y);
//nextJoueur();
if(event.button.y>pos_bouton1.y&&event.button.y<pos_bouton1.y+bouton1->h){
//nextPerso();
}
if(event.button.y>pos_bouton2.y&&event.button.y<pos_bouton2.y+bouton2->h){
//nextJoueur();
}
if(event.button.x<LARGEUR_CARTE*LARGEUR_CASE){
//deplacement_personnage(event.button.x,event.button.y);
}
break;
case SDL_MOUSEMOTION:
if(event.motion.x<LARGEUR_CARTE*LARGEUR_CASE&&event.motion.y<HAUTEUR_CARTE*HAUTEUR_CASE)
......@@ -779,9 +782,6 @@ int affichage_carte()
case SDL_KEYDOWN:/* Si c'est un vnement de type "touche presse" */
switch(event.key.keysym.sym)
{
case SDLK_n:
//persosuivant();
break;
case SDLK_ESCAPE:
afficher_menu();
break;
......@@ -824,9 +824,9 @@ int affichage_carte()
SDL_BlitSurface(Case_brillante,NULL,ecran,&Position_Case_brillante);
SDL_BlitSurface(texte,NULL,ecran,&pos_texte);
SDL_BlitSurface(texte2,NULL,ecran,&pos_texte2);
SDL_BlitSurface(texte3,NULL,ecran,&pos_texte3);
SDL_BlitSurface(texte4,NULL,ecran,&pos_texte4);
SDL_BlitSurface(nom_joueur,NULL,ecran,&pos_nom_joueur);
SDL_BlitSurface(bouton1,NULL,ecran,&pos_bouton1);
SDL_BlitSurface(bouton2,NULL,ecran,&pos_bouton2);
SDL_Flip(ecran);
}
......
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