#ifndef COLLISION_H_INCLUDED
#define COLLISION_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include "background.h"
#include "chien.h"
#include "collision.h"
#include "perso.h"
#include "jennyfer.h"
#define GFX_W 642
#define GFX_H 450
/**
*@brief structure qui dèfinit un sprite
*@details elle nous renseigne sur la largeur, l'hauteur , sa position sur l'axe des x et 
*sa position sur l'axe des y
*/
typedef struct {
        int x;
	int y;
	int w;
	int h;
}Sprite;

//collision
int get_pixel(BITMAP* Buffer,int x,int y);
int collision_background_left(Sprite sprite1,BITMAP* Backgroundcol);
int collision_background_right(Sprite sprite1,BITMAP* Backgroundcol);
int collision_background_up(Sprite sprite1,BITMAP* Backgroundcol);
int collision_background_down(Sprite sprite1,BITMAP* Backgroundcol);
void game_over_rat(BITMAP *Buffer, rat *rat , jennyfer *jenn, BITMAP *OVER,BITMAP *BLOOD, int *k);
int bounding_box_collision(Sprite Sprite1, Sprite Sprite2);
void game_over (BITMAP *Buffer, chien *chien , jennyfer *jenn, BITMAP *OVER,BITMAP *BLOOD, int *K);


#endif // COLLISION_H_INCLUDED
