SAE11_2023/JEUX_SERPENT/fonction.h

39 lines
1015 B
C
Raw Normal View History

2023-12-07 14:02:18 +01:00
#ifndef FONCTION_H
#define FONCTION_H
#include <stdlib.h>
#include <stdio.h>
#include <graph.h>
2023-12-17 12:58:38 +01:00
2023-12-07 14:02:18 +01:00
extern int seconde, minute, seconde_actuel, old_seconde;
extern char timer[6];
extern int pos_x[2400], pos_y[2400], old_x[2400], old_y[2400];
2023-12-07 14:02:18 +01:00
2023-12-19 15:44:28 +01:00
extern int pommex[5], pommey[5];
2023-12-07 14:02:18 +01:00
extern char score[4];
extern int go_on;
2023-12-17 12:58:38 +01:00
extern int go_menu;
extern int pause;
2023-12-07 14:02:18 +01:00
2023-12-19 15:44:28 +01:00
void Pomme(int pomme);
2023-12-19 11:52:06 +01:00
int Controle(int direction);
2023-12-19 15:44:28 +01:00
void Serpent(int direction, int segment, int tete_up, int tete_down, int tete_left, int tete_right, int serpent, int fond);
void Update_Serpent(int direction, int segment, int tete_up, int tete_down, int tete_left, int tete_right, int serpent);
2023-12-19 12:46:10 +01:00
long int Update_Vitesse(long int vitesse);
2023-12-19 13:09:01 +01:00
int Update_Segment(int segment);
2023-12-19 11:52:06 +01:00
2023-12-07 14:02:18 +01:00
void Terrain();
2023-12-19 15:44:28 +01:00
void Timer(unsigned long int suivant);
2023-12-07 14:02:18 +01:00
void Update_Timer();
2023-12-19 15:44:28 +01:00
void DessinerScene(int segment, int serpent, int pomme);
int Score(int segment, int Nbr);
2023-12-19 13:09:01 +01:00
void Collision(int segment);
2023-12-19 11:52:06 +01:00
2023-12-19 15:44:28 +01:00
void MenuDeFin(int Nbr);
2023-12-10 14:52:16 +01:00
void MenuDebut();
2023-12-19 13:09:01 +01:00
void Attendre(long int microsecondes);
2023-12-04 17:01:52 +01:00
#endif