#ifndef OBJET_H_INCLUDED
#define OBJET_H_INCLUDED
#include <stdlib.h>
#include<allegro.h>

#include"jennyfer.h"
#include "background.h"

typedef struct
{
    BITMAP *EAU[6] ;
    int xm;
    int ym ;
} water ;

typedef struct
{
    BITMAP *go ;
    BITMAP *image;
    BITMAP *win ;
    BITMAP *lost ;
    int verif ;
    int gagnee ;
} Depart ;
typedef struct
{
    BITMAP *cafar_droite ;
    BITMAP *cafar_gauche ;
    int x;
    int y ;
    int dir ;
} Cafar ;
typedef struct
{
    BITMAP *img ;
    int x;
    int y ;
    int dir ;
} Paserelle ;


void prendre_clef(jennyfer *jenn,BITMAP *Backgroundcol);
void draw_clef(jennyfer *jenn,BITMAP *Buffer,BITMAP *Background);
void prendre_couteau(jennyfer *jenn,BITMAP *Backgroundcol);
void draw_couteau(jennyfer *jenn,BITMAP *Buffer,BITMAP *Background);

void prendre_objet  (jennyfer *jenn,BITMAP *Backgroundcol,BITMAP *Buffer,BITMAP *Background);
void prendre_enreg(jennyfer *jenn,BITMAP *Backgroundcol);
void enregistrer_info(jenn,Backgroundcol) ;

//void recharger_info (jennyfer *jenn);
void draw_enreg(jennyfer *jenn,BITMAP *Buffer,BITMAP *Background);
void load_eau(water *Eau );
void init_water(water *Eau);
void init_dep (Depart *depart );

void afficher_water(water *Eau,BITMAP *Buffer,BITMAP *Background,jennyfer *jenn,BITMAP *Backgroundcol);
void load_depart (Depart *depart);

void depar (  Depart *depart ,BITMAP *Buffer,BITMAP *Background );
void win (Depart *depart,BITMAP *Buffer,jennyfer *jenn);
void verif_lost(Cafar *cafar,BITMAP *Buffer,jennyfer *jenn,Depart *depart);
void move_cafar(Cafar *cafar);
void sawer_cafar (Cafar *cafar,BITMAP *Buffer );
void init_cafar (Cafar *cafar);
void init_pas (Paserelle *p);
void load_pass(Paserelle *p);
void move_pass(Paserelle *p);
void sawer_pass (Paserelle *p,BITMAP *Buffer2,BITMAP *Buffer );

#endif // OBJET_H_INCLUDED
