2021-12-17 17:59:37 +01:00
|
|
|
#ifndef GRAPHIQUE_C
|
|
|
|
#define GRAPHIQUE_C
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <graph.h>
|
|
|
|
|
|
|
|
void DessinerVirus(unsigned long int addresse, char* coul){
|
|
|
|
couleur t;
|
|
|
|
|
|
|
|
t=CouleurParNom(coul);
|
|
|
|
ChoisirCouleurDessin(t);
|
|
|
|
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
|
|
|
for(i=0;i<16;i++){
|
2021-12-17 18:34:37 +01:00
|
|
|
for(j=0;j<500;j++){
|
2021-12-17 17:59:37 +01:00
|
|
|
addresse=addresse-1;
|
|
|
|
if(addresse==0){
|
2021-12-17 18:34:37 +01:00
|
|
|
x=j*3;
|
|
|
|
y=i*55;
|
2021-12-17 17:59:37 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(addresse==0){
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2021-12-17 18:34:37 +01:00
|
|
|
DessinerRectangle(35+x, 20+y, 3, 30);
|
2021-12-17 17:59:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void PremiereImage(void){
|
|
|
|
int x=3;
|
|
|
|
int y=45+10;
|
|
|
|
int i;
|
|
|
|
int lx=3;
|
|
|
|
int ly=30;
|
|
|
|
int j;
|
|
|
|
|
|
|
|
for(i=0;i<16;i++){
|
|
|
|
|
2021-12-17 18:34:37 +01:00
|
|
|
for(j=0;j<500;j++){
|
2021-12-17 17:59:37 +01:00
|
|
|
|
|
|
|
DessinerRectangle(35+j*(x), 20+i*(y), lx, ly);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ImageFin(int nb_image){
|
|
|
|
couleur c;
|
|
|
|
c=CouleurParNom("red");
|
|
|
|
ChoisirCouleurDessin(c);
|
|
|
|
EcrireTexte(700, 400, "Fin de la Partie", 2);
|
|
|
|
Touche();
|
|
|
|
if(nb_image==1){
|
|
|
|
c=CouleurParNom("blue");
|
|
|
|
EffacerEcran(c);
|
|
|
|
c=CouleurParNom("white");
|
|
|
|
ChoisirCouleurDessin(c);
|
|
|
|
EcrireTexte(650, 400, "Le virus numero 1 a gagner", 2);
|
|
|
|
}
|
|
|
|
if(nb_image==2){
|
|
|
|
c=CouleurParNom("green");
|
|
|
|
EffacerEcran(c);
|
|
|
|
c=CouleurParNom("white");
|
|
|
|
ChoisirCouleurDessin(c);
|
|
|
|
EcrireTexte(650, 400, "Le virus numero 2 a gagner", 2);
|
|
|
|
}
|
2021-12-17 18:34:37 +01:00
|
|
|
if(nb_image==3){
|
|
|
|
c=CouleurParNom("white");
|
|
|
|
ChoisirCouleurDessin(c);
|
|
|
|
EffacerEcran(c);
|
|
|
|
c=CouleurParNom("black");
|
|
|
|
ChoisirCouleurDessin(c);
|
|
|
|
EcrireTexte(650, 400, "egalite", 2);
|
|
|
|
}
|
2021-12-17 17:59:37 +01:00
|
|
|
Touche();
|
|
|
|
}
|
|
|
|
#endif
|