Skip to content
Snippets Groups Projects
Commit 59fa7612 authored by Romain Jegat's avatar Romain Jegat
Browse files

Ajout d'un bouton attaquer

parent bf7a427d
No related branches found
No related tags found
No related merge requests found
Pipeline #
resources/Skins/coeur.bmp

6.34 KiB | W: | H:

resources/Skins/coeur.bmp

6.34 KiB | W: | H:

resources/Skins/coeur.bmp
resources/Skins/coeur.bmp
resources/Skins/coeur.bmp
resources/Skins/coeur.bmp
  • 2-up
  • Swipe
  • Onion skin
......@@ -688,20 +688,24 @@ int affichage_carte()
SDL_Surface* perso; //surfaces affichees sur le cote
SDL_Surface* PV = NULL;
SDL_Surface* coeur = NULL;
SDL_Surface* mana = NULL;
SDL_Surface* texte = NULL;
SDL_Surface* nom_joueur = NULL;
SDL_Surface* bouton1 = NULL;
SDL_Surface* bouton2 = NULL;
SDL_Surface* bouton3 = NULL;
SDL_Surface* personnage_numero = NULL;
SDL_Surface* nombre_deplacement = NULL;
SDL_Rect pos_perso;
SDL_Rect pos_PV;
SDL_Rect pos_coeur;
SDL_Rect pos_mana;
SDL_Rect pos_texte;
SDL_Rect pos_nom_joueur;
SDL_Rect pos_bouton1;
SDL_Rect pos_bouton2;
SDL_Rect pos_bouton3;
SDL_Rect pos_personnage_numero;
SDL_Rect pos_nombre_deplacement;
......@@ -719,6 +723,8 @@ int affichage_carte()
nom_joueur= TTF_RenderText_Shaded(vieille_police, obtenirNomJoueurCourant(), couleurBlanche, couleurNoire);
bouton1= TTF_RenderText_Shaded(vieille_police, "Perso suivant", couleurDoree, couleurBleue);
bouton2= TTF_RenderText_Shaded(vieille_police, "Joueur suivant", couleurDoree, couleurBleue);
bouton3= TTF_RenderText_Shaded(vieille_police, "Attaquer", couleurDoree, couleurBleue);
coeur = SDL_LoadBMP("../resources/Skins/coeur.bmp");
char buffer_PV[40];
sprintf(buffer_PV, "PV : %d/%d", obtenirPVPersonnage(perso_actuel),obtenirPVMaxPersonnage(perso_actuel));
......@@ -787,10 +793,13 @@ int affichage_carte()
pos_mana.y=pos_PV.y+(3*PV->h)/2;
pos_nombre_deplacement.x=ecran->w-(LARGEUR_BORDURE-25);
pos_nombre_deplacement.y=pos_mana.y+(3*PV->h)/2;
pos_bouton2.x=ecran->w-(LARGEUR_BORDURE-25);
pos_bouton2.y=ecran->h-bouton2->h-40;
pos_bouton2.y=ecran->h-bouton3->h-60;
pos_bouton1.x=ecran->w-(LARGEUR_BORDURE-25);
pos_bouton1.y=pos_bouton2.y-(2*bouton2->h);
pos_bouton3.x=ecran->w-(LARGEUR_BORDURE-25);
pos_bouton3.y=pos_bouton1.y-(2*bouton1->h);
for(j=0; j<HAUTEUR_CARTE; j++)
{
......@@ -911,6 +920,7 @@ int affichage_carte()
SDL_BlitSurface(nom_joueur,NULL,ecran,&pos_nom_joueur);
SDL_BlitSurface(bouton1,NULL,ecran,&pos_bouton1);
SDL_BlitSurface(bouton2,NULL,ecran,&pos_bouton2);
SDL_BlitSurface(bouton3,NULL,ecran,&pos_bouton3);
SDL_BlitSurface(mana,NULL,ecran,&pos_mana);
SDL_BlitSurface(perso,NULL,ecran,&pos_perso);
SDL_BlitSurface(personnage_numero,NULL,ecran,&pos_personnage_numero);
......@@ -938,6 +948,7 @@ int affichage_carte()
SDL_FreeSurface(perso);
SDL_FreeSurface(bouton1);
SDL_FreeSurface(bouton2);
SDL_FreeSurface(bouton3);
SDL_FreeSurface(PV);
SDL_FreeSurface(ecran);
SDL_FreeSurface(personnage_numero);
......
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