#ifndef FONCTIONS_HPP_INCLUDED
    #define FONCTIONS_HPP_INCLUDED

    typedef struct button
    {
        int x, y, w, h;
        char* texte;
        SDL_Color couleurTexte;
        SDL_Color couleurFond;
    } button;

    typedef struct difficult
    {
        int min, max;
        int temps;
        int pxPerS;
        bool libre;
    } difficult;

    #define color(X,R,G,B) SDL_FillRect(X, NULL, SDL_MapRGB(X->format, R, G, B));
    #define xyToRect(x, y) (SDL_Rect){(Sint16)x, (Sint16)y, 0, 0}

    void jouerMusique(const char* chaine);
    void pause();
    void delColor(SDL_Surface *image, int r, int v, int b);
    void advancedBlit(SDL_Surface* src, SDL_Rect* coordonnes);
    SDL_Rect write(SDL_Color couleur, int x, int y, bool big, const char* text, ...);
    SDL_Color rgbToColor(Uint8 r, Uint8 g, Uint8 b);
    button createButton(int x, int y, SDL_Color couleurTexte, SDL_Color couleurFond, const char* texte);
    void initFMOD();
    SDL_Rect trajectoireCirculaire(double rayon, double angle);
    void afficherFps(int actualTicks, int oldTicks);
    int checkZone(int x,int y,SDL_Rect pos,int w,int h);

#endif
