94 lines
1.2 KiB
C
94 lines
1.2 KiB
C
/* Fonction qui affiche l'écran de fin du jeu
|
|
|
|
Written by Yann KERAUDREN and Titouan LERICHE */
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "ecran_fin.h"
|
|
|
|
|
|
|
|
void ecran_fin(short int* compteur, unsigned char minutes, unsigned char secondes) {
|
|
|
|
|
|
|
|
couleur grey, white, red;
|
|
|
|
char comp[10];
|
|
|
|
char min[5];
|
|
char sec[5];
|
|
|
|
int touche;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
grey = CouleurParComposante(60, 60, 60);
|
|
ChoisirCouleurDessin(grey);
|
|
|
|
RemplirRectangle(400,150,650,500);
|
|
|
|
red = CouleurParComposante(255,0,0);
|
|
ChoisirCouleurDessin(red);
|
|
|
|
EcrireTexte(680,250, "DEAD", 2);
|
|
|
|
EcrireTexte(490,370, "espace = rejouer", 2);
|
|
|
|
EcrireTexte(800,370, "echap = quitter", 2);
|
|
|
|
|
|
|
|
|
|
|
|
white = CouleurParComposante(255,255,255);
|
|
ChoisirCouleurDessin(white);
|
|
|
|
EcrireTexte(420,500, "Votre score : ", 2);
|
|
|
|
sprintf(comp, "%hd", *compteur);
|
|
|
|
EcrireTexte( 620, 500, comp, 2);
|
|
|
|
|
|
EcrireTexte(750,500, "Temps ", 2);
|
|
|
|
sprintf(min, "%hhd", minutes);
|
|
|
|
EcrireTexte (875, 500, min, 2);
|
|
|
|
EcrireTexte (900, 500, ":", 2);
|
|
|
|
sprintf( sec, "%hhd", secondes);
|
|
|
|
EcrireTexte( 920, 500, sec, 2);
|
|
|
|
|
|
|
|
|
|
free(compteur);
|
|
|
|
|
|
touche = Touche();
|
|
|
|
if ( touche == XK_Escape ) {
|
|
return;
|
|
}
|
|
|
|
if ( touche == XK_space) {
|
|
|
|
FermerGraphique();
|
|
main();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|