1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#ifndef MAIN_H
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
#include <FMOD/fmod.h>
#define LARGEUR_ECRAN 450
#define HAUTEUR_ECRAN 375
#define NBRE_DE_BIT 32
#define HAUTEUR_SPRITE 15
#define LARGEUR_SPRITE 15
#define LARGEUR_CADRE_GAMEOVER 200
#define HAUTEUR_CADRE_GAMEOVER 200
/* On défini une variable "Point" qui nous servira pour avoir toutes
les coordonnées des parties du serpent et aussi des Pommes etc. */
typedef struct
{
int x;
int y;
}Position;
//Les directions dans lesquels le serpent peut aller
enum{BAS,GAUCHE,DROITE,HAUT};
/* PROTOTYPE DES FONCTIONS */
void deplacerSerpent(int direction, SDL_Rect positionSerpent[], SDL_Rect *positionPomme, int *nombreDeCorp, int *gameOver, int *pomme);
bool pommeDansSerpent(int X, int Y, int nombreDeCorp);
#endif /* !MAIN_H */ |
Partager