F1rush/include/voiture.h

48 lines
917 B
C
Raw Normal View History

2017-01-29 10:19:46 +01:00
#ifndef _VOITURE
#define _VOITURE
2017-01-29 15:45:06 +01:00
2017-01-31 20:26:51 +01:00
unsigned int key; // touche pressee
2017-01-29 15:45:06 +01:00
2017-01-31 20:26:51 +01:00
unsigned int compteur; // tourne a 15 Hz
2017-01-29 15:45:06 +01:00
2017-02-13 07:38:49 +01:00
unsigned int seed=12345;
2017-02-07 19:29:16 +01:00
2017-02-01 22:23:54 +01:00
//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
2017-01-29 15:45:06 +01:00
2017-01-29 10:19:46 +01:00
typedef struct Obstacles
2017-01-31 20:26:51 +01:00
{
char num_obst;
short coordx;
} Obstacles;
typedef struct Voiture
{
char corridor;
unsigned short money;
unsigned short essence;
unsigned int distance;
2017-02-07 07:46:19 +01:00
int life;
2017-01-31 20:26:51 +01:00
unsigned char speed;
2017-02-01 22:23:54 +01:00
unsigned char decalx;
2017-02-07 19:29:16 +01:00
} Voiture;
2017-01-29 15:45:06 +01:00
2017-01-29 10:19:46 +01:00
int Menu(void);
int Jeu(void);
2017-02-01 20:36:00 +01:00
void new_frame(void);
void generate_obstacle(char ID_corridor);
2017-02-13 07:38:49 +01:00
unsigned int rand(int min, int max);
2017-02-01 20:36:00 +01:00
2017-01-29 15:45:06 +01:00
#endif