30 lines
869 B
C
30 lines
869 B
C
#include <stdlib.h>
|
|
#include <graph.h>
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
#include "temps_et_score.h"
|
|
|
|
void Attendre(unsigned int millisecondes){
|
|
unsigned long debut = Microsecondes();
|
|
unsigned long attente = millisecondes * 1000;
|
|
while (Microsecondes() - debut < attente){
|
|
}
|
|
}
|
|
|
|
void Afficher_Temps(int minutes, int secondes, char texte[]){
|
|
ChoisirCouleurDessin(CouleurParNom("black"));
|
|
RemplirRectangle(75, 650, 250, 40);
|
|
ChoisirCouleurDessin(CouleurParNom("white"));
|
|
sprintf(texte, "Temps : %02d : %02d", minutes, secondes);
|
|
EcrireTexte(85, 685, texte, 2);
|
|
}
|
|
|
|
void Afficher_Score(int score, char texte[]){
|
|
ChoisirCouleurDessin(CouleurParNom("black"));
|
|
RemplirRectangle(825, 655, 150, 40);
|
|
ChoisirCouleurDessin(CouleurParNom("white"));
|
|
sprintf(texte, "Score : %3d", score);
|
|
EcrireTexte(825, 685, texte, 2);
|
|
}
|
|
|