30 lines
888 B
C
30 lines
888 B
C
|
#ifndef MAIN_H
|
||
|
#define MAIN_H
|
||
|
|
||
|
#include "serpent.h"
|
||
|
#include "pommes.h"
|
||
|
#include "obstacles.h"
|
||
|
#include "graphique.h"
|
||
|
|
||
|
#define HAUTEUR 40
|
||
|
#define LARGEUR 60
|
||
|
#define TAILLE_CASE 19
|
||
|
#define NOMBRE_POMMES 5
|
||
|
#define NOMBRE_OBSTACLES 20
|
||
|
#define CYCLE 100000L
|
||
|
|
||
|
void Attendre(unsigned int millisecondes);
|
||
|
void InitialiserJeu(Serpent* serpent, Pommes* pommes, Obstacles* obstacles);
|
||
|
void AffichageBasique();
|
||
|
void AfficherScore(int score);
|
||
|
void LibererMemoire(Serpent* serpent, Pommes* pommes, Obstacles* obstacles);
|
||
|
void AfficheTemps(int minute, int seconde);
|
||
|
void AfficherEcranFin(int score);
|
||
|
int PauseJeu();
|
||
|
void AfficherSerpent(Serpent* serpent);
|
||
|
void GenererObstacles(Obstacles* obstacles, Pommes* pommes, Serpent* serpent);
|
||
|
void DeplacerSerpent(Serpent* serpent, int* direction);
|
||
|
int GestionCollision(Serpent* serpent, Pommes* pommes, Obstacles* obstacles, int perdu, int* score);
|
||
|
|
||
|
#endif
|