ajout de l'écran de fin du jeu
This commit is contained in:
43
snake/affichage_timer.c
Normal file
43
snake/affichage_timer.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* fonction d'affichage du score dans la fenêtre graphique */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "affichage_timer.h"
|
||||
|
||||
|
||||
void affichage_timer(unsigned char minutes, unsigned char secondes) {
|
||||
|
||||
|
||||
char min[5];
|
||||
char sec[5];
|
||||
|
||||
couleur grey, white;
|
||||
|
||||
|
||||
|
||||
grey = CouleurParComposante(35,35,35);
|
||||
ChoisirCouleurDessin(grey);
|
||||
RemplirRectangle(1250, 150, 170, 70);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sprintf(min, "%hhu", minutes);
|
||||
|
||||
sprintf(sec, "%hhu", secondes);
|
||||
|
||||
|
||||
|
||||
white = CouleurParComposante(255, 255, 255);
|
||||
ChoisirCouleurDessin(white);
|
||||
|
||||
EcrireTexte(1290, 180, min, 2);
|
||||
|
||||
EcrireTexte(1330, 180, ":", 2);
|
||||
|
||||
EcrireTexte(1370, 180, sec, 2);
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user