48 lines
917 B
C
48 lines
917 B
C
#ifndef _VOITURE
|
|
#define _VOITURE
|
|
|
|
unsigned int key; // touche pressee
|
|
|
|
unsigned int compteur; // tourne a 15 Hz
|
|
|
|
unsigned int seed=12345;
|
|
|
|
//char obstacles[100]; // permet d'avoir de l'aléatoire pondéré pour les obstacles/bonus
|
|
|
|
// obstacle
|
|
// 0 = vide
|
|
// 1 = mur
|
|
// 2 = augmentation vitesse
|
|
// 3 = diminution vitesse
|
|
// 4 = vie
|
|
// 5 = boost avant
|
|
// 6 = essence
|
|
// 7 = piece 1
|
|
// 8 = piece 2
|
|
|
|
typedef struct Obstacles
|
|
{
|
|
char num_obst;
|
|
short coordx;
|
|
} Obstacles;
|
|
|
|
typedef struct Voiture
|
|
{
|
|
char corridor;
|
|
unsigned short money;
|
|
unsigned short essence;
|
|
unsigned int distance;
|
|
int life;
|
|
unsigned char speed;
|
|
unsigned char decalx;
|
|
} Voiture;
|
|
|
|
int Menu(void);
|
|
int Jeu(void);
|
|
void new_frame(void);
|
|
void generate_obstacle(char ID_corridor);
|
|
|
|
unsigned int rand(int min, int max);
|
|
|
|
#endif
|