diff --git a/Test_Touches.c b/Test_Touches.c deleted file mode 100644 index 74ef3d8..0000000 --- a/Test_Touches.c +++ /dev/null @@ -1,50 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <graph.h> - -#define delta 1000000L - -int main(void) -{ - unsigned long suivant; - int go_on=1; - int n; - - InitialiserGraphique(); - CreerFenetre(0,0,800,500); - - while(go_on) - { - if (ToucheEnAttente() == 1) - { - switch (Touche()) - { - case XK_Up: - printf("Touche haut\n"); - break; - case XK_Down: - printf("Touche bas\n"); - break; - case XK_Left: - printf("Touche gauche\n"); - break; - case XK_Right: - printf("Touche droite\n"); - break; - - default: - printf("Autre touche\n"); - break; - } - } - else - { - if (Microsecondes()>suivant) - { - n++; - suivant=Microsecondes()+delta; - } - } - } - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/Test_pinguin.c b/Test_pinguin.c deleted file mode 100644 index 06c009b..0000000 --- a/Test_pinguin.c +++ /dev/null @@ -1,59 +0,0 @@ -#include<stdio.h> -#include<stdlib.h> -#include<graph.h> -#define delta 1000000L - -void DessinerScene(int sprite,int x,int y,int n) -{ - char buf[100]; - ChoisirEcran(1); - CopierZone(2,1,0,0,800,500,0,0); - snprintf(buf,100,"temps : %05d",n); - EcrireTexte(10,20,buf,0); - AfficherSprite(sprite,x,y); - CopierZone(1,0,0,0,800,500,0,0); -} - -int main() -{ - int pingouin; - int x,y,old_x,old_y; - int n; - unsigned long suivant; - int go_on=1; - - InitialiserGraphique(); - CreerFenetre(0,0,800,500); - ChoisirEcran(2); - ChargerImageFond("./images/arctis2.jpg"); - pingouin=ChargerSprite("./images/walk-0.png"); - x=y=old_x=old_y=10; - n=0; - DessinerScene(pingouin,x,y,0); - suivant=Microsecondes()+delta; - - while(go_on) - { - if (SourisCliquee()) go_on=0; - else - { - if (Microsecondes()>suivant) - { - n++; - DessinerScene(pingouin,x,y,n); - suivant=Microsecondes()+delta; - } - SourisPosition(); - x=_X; - y=_Y; - if (x!=old_x || y!=old_y) - { - DessinerScene(pingouin,x,y,n); - old_x=x; - old_y=y; - } - } - } - FermerGraphique(); -} - \ No newline at end of file diff --git a/images/arctis2.jpg b/images/arctis2.jpg deleted file mode 100644 index 6330402..0000000 Binary files a/images/arctis2.jpg and /dev/null differ diff --git a/images/walk-0.png b/images/walk-0.png deleted file mode 100644 index 7e3b61d..0000000 Binary files a/images/walk-0.png and /dev/null differ diff --git a/test b/test deleted file mode 100755 index 81b28f9..0000000 Binary files a/test and /dev/null differ diff --git a/test.c b/test.c deleted file mode 100644 index bbe5266..0000000 --- a/test.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <stdio.h> - -#define TAILLE 20 - -/* Fonction pour afficher un tableau de coordonnées */ -void afficherSerpent(int serpent[], int taille) { - int i = 0; - for (i = 0; i < taille; i += 2) { - printf("(%d, %d) ", serpent[i], serpent[i + 1]); - } - printf("\n"); -} - -/* Fonction pour décaler chaque paire d'éléments (x, y) du tableau vers la droite */ -void decalerSerpent(int serpent[], int taille) { - int tempX = serpent[0]; - int tempY = serpent[1]; - int i; - - for (i = 2; i < taille; i += 2) { - int tempX2 = serpent[i]; - int tempY2 = serpent[i + 1]; - - serpent[i] = tempX; - serpent[i + 1] = tempY; - - tempX = tempX2; - tempY = tempY2; - } -} - -int main() { - int serpent[TAILLE] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; - - printf("Serpent initial : "); - afficherSerpent(serpent, TAILLE); - - /* Décaler le serpent d'une paire d'éléments vers la droite */ - decalerSerpent(serpent, TAILLE); - - printf("Serpent après décalage : "); - afficherSerpent(serpent, TAILLE); - - return 0; -} diff --git a/testpinguin b/testpinguin deleted file mode 100755 index 7192599..0000000 Binary files a/testpinguin and /dev/null differ diff --git a/touche.c b/touche.c deleted file mode 100644 index 3961b76..0000000 --- a/touche.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <graph.h> - -int main(void) -{ - if(Touche() == "XK_Left") - { - EcrireTexte(100,200,"Touché !",2); - ToucheEnAttente(); - } - return EXIT_SUCCESS; -} \ No newline at end of file