#ifndef CLASE
#define CLASE
#include "SDL/SDL.h"
#include "SDL/SDL_ttf.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_mixer.h"
#include <cstdlib>
#include "functions.h"

class _player
{
public:
    void deschide(char *sir);
    void deseneaza();
    void miscare();
    void coordonate(int a, int b);
    int x, y;
private:
    int invincibil;
    SDL_Surface* sup;
    SDL_Surface* sup2;
};


class _catch_me
{
public:
    void deschide(char *sir);
    void deseneaza();
    void coordonate(int a, int b);
    void seteaza();
    int x, y;
    int got_me();
private:
    SDL_Surface* sup;
};

class _fantoma
{
public:
    void deschide(char *sir);
    void deseneaza();
    void miscare();
    void coordonate(int a, int b);
    void seteaza();
    int mori();
    int x, y;
private:
    int directie;//0 jos, 1 sus, 2 stanga, 3 dreapta
    int stanga;
    SDL_Surface* sup;
};


class _buton
{
public:
    void coordonate(int a, int b);
    void dimensiuni(int latime=375, int inaltime=63);
    void deseneaza();
    int click();
    void deschide(char* sir);
    void deschide2(char* sir);
    void miscare();
    int hover;
private:
    int x, y;
    int w, h;
    SDL_Surface* sup;
    SDL_Surface* supt;

};


class _fundal
{
public:
    void coordonate(int a, int b);
    void dimensiuni(int latime=1000, int inaltime=750);
    void deseneaza();
    void deschide(char* sir);
    int x, y;
private:
    int w, h;
    SDL_Surface* sup;
};

extern _fundal wallpaper;
extern _fundal text_instructiuni;
extern _fundal joc;
extern _fundal gameover;

extern _buton inapoi;
extern _buton start;
extern _buton instructiuni;
extern _buton optiuni;
extern _buton iesire;
extern _buton pauza;
extern _buton highscores;
extern _player player;
extern _buton meniu;
extern _buton restart;

extern _fantoma fantoma[200];
extern _fantoma power_up[20];
extern _fantoma cooldown[20];//dureaza 5 sec
extern _fantoma invincible[20];

extern _catch_me catch_me;


extern SDL_Surface* screen;
extern SDL_Event x_out;
extern int MISCARE;
extern SDL_Surface *message;
extern TTF_Font *font;
extern SDL_Color textColor;

extern Mix_Music *muzica;
extern Mix_Chunk *clic;

extern char high[13];

extern _buton sound;

#endif // CLASE
