ajout commentaires plus fonctions graph.h manquantes
This commit is contained in:
parent
85409dab44
commit
e6e209067f
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
#include <graph.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../fichier.h/Oeuf.h"
|
||||
#include "../fichier.h/time.h"
|
||||
|
||||
|
@ -2,45 +2,55 @@
|
||||
#include <stdio.h>
|
||||
#include <graph.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../fichier.h/serpent.h"
|
||||
#include "../fichier.h/Oeuf.h"
|
||||
#include "../fichier.h/time.h"
|
||||
#include "../fichier.h/main.h"
|
||||
#include "../fichier.h/menu.h"
|
||||
|
||||
#define CYCLE 100000L
|
||||
#define DELAI_MILLISECONDES 100
|
||||
|
||||
void attente(int milliseconds) {
|
||||
clock_t start_time = clock();
|
||||
while ((clock() - start_time) * 1000 / CLOCKS_PER_SEC < milliseconds) {
|
||||
}
|
||||
}
|
||||
|
||||
int lancer_jeu(){
|
||||
/*Variable jeu*/
|
||||
int go_on=1;
|
||||
int pause = 1;
|
||||
/*Variable Serpent*/
|
||||
int segment = 10;
|
||||
int direction = 4;
|
||||
int minute = 0;
|
||||
int seconde = 0;
|
||||
int seconde_actuel = 0;
|
||||
int old_seconde = 0;
|
||||
unsigned long int suivant;
|
||||
int pos_x[2400];
|
||||
int pos_y[2400];
|
||||
int old_x[2400];
|
||||
int old_y[2400];
|
||||
/*Variable pour le temps*/
|
||||
int minute = 0;
|
||||
int seconde = 0;
|
||||
int seconde_actuel = 0;
|
||||
int old_seconde = 0;
|
||||
char timer[6];
|
||||
unsigned long int suivant;
|
||||
/*Variable Oeufs*/
|
||||
int oeufx[5];
|
||||
int oeufy[5];
|
||||
/*Variable Murs*/
|
||||
int murx[30];
|
||||
int mury[30];
|
||||
char timer[6];
|
||||
/*Pointeur */
|
||||
int *pointeur_segment = &segment;
|
||||
int *pointeur_direction = &direction;
|
||||
int *pointeur_minute = &minute;
|
||||
int *pointeur_seconde = &seconde;
|
||||
unsigned long int *pointeur_suivant = &suivant;
|
||||
int *pointeur_seconde_actuel = &seconde_actuel;
|
||||
int *pointeur_old_seconde = &old_seconde;
|
||||
int *pointeur_pause = &pause;
|
||||
unsigned long int *pointeur_suivant = &suivant;
|
||||
suivant = Microsecondes()+CYCLE;
|
||||
old_seconde=(suivant/1000000)%10;
|
||||
Scene(murx, mury, minute, seconde ,timer);
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <graph.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <graph.h>
|
||||
|
||||
#include "../fichier.h/main.h"
|
||||
#include "../fichier.h/time.h"
|
||||
|
||||
void Menu_debut(void) {
|
||||
int af = ChargerSprite("img/image.jpg");
|
||||
AfficherSprite(af, 0, 0);
|
||||
|
@ -1,3 +1,7 @@
|
||||
#include <graph.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <graph.h>
|
||||
#include "../fichier.h/serpent.h"
|
||||
#include "../fichier.h/main.h"
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <graph.h>
|
||||
#include <time.h>
|
||||
#include <graph.h>
|
||||
|
||||
#include "../fichier.h/time.h"
|
||||
#include "../fichier.h/terrain.h"
|
||||
#include "../fichier.h/serpent.h"
|
||||
|
Loading…
Reference in New Issue
Block a user