/**
* @file background.c
* @author fatma & omar <3 
* @version 1.0
* @date 20 mai 2013
*/
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include "background.h"
#include "chien.h"
#include "collision.h"
#include "jennyfer.h"
#define GFX_W 642
#define GFX_H 450
/**
* @fn BITMAP* load_background_bmp(char chemin_background[])
* @details chargement des background
* @param chemin de background 
* @return BITMAP */ 
BITMAP* load_background_bmp(char chemin_background[])
{ 
    BITMAP* Background;
    Background=load_bitmap(chemin_background, NULL);
        if(Background == NULL)
          {
          set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
           allegro_message("Unable to load image !\n%s\n", allegro_error);
			return (NULL);
	   }
return (Background);

}

/**
* @fn void draw_background(BITMAP *Background,BITMAP *Buffer)
* @details elle affiche ce qu'il y 'a sous le Buffer
* @param Background et Buffer sont de type BITMAP
* @return void */ 
void draw_background(BITMAP *Background,BITMAP*Buffer)
{
	blit(Background, Buffer, 0, 0, 0, 0, SCREEN_W, SCREEN_H);
}
 /**
* @fn void destroy_background(BITMAP *Background)
* @details il ecrase ce qu'il y'a dans le Buffer
* @param Background est de type BITMAP
* @return void */  
void destroy_background(BITMAP *Background)
{
	destroy_bitmap(Background);
}

