#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <fmod.h>
#include <stdlib.h>
#include <time.h>
#include "fonctions.hpp"
#include "jouer.hpp"

// TODO (Cesar#1#): Faire les Highscores
// TODO (Cesar#2#): Cube piege
// TODO (Cesar#3#): Cube Bonus
// TODO (Cesar#4#): Optimiser

SDL_Surface *ecran;
TTF_Font *policeMini;
TTF_Font *policeMaxi;

int main(int argc, char *argv[])
{
    srand(time(NULL));
    putenv ("SDL_VIDEO_WINDOW_POS=center");
    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER);
    const SDL_VideoInfo* info = SDL_GetVideoInfo();
    TTF_Init();
    initFMOD();

    ecran = SDL_SetVideoMode(info->current_w, info->current_h, info->vfmt->BitsPerPixel, SDL_HWSURFACE | SDL_NOFRAME | SDL_DOUBLEBUF);
    SDL_WM_SetCaption("Clique le cube !", NULL);
    policeMini = TTF_OpenFont("game_over.ttf", 50);
    policeMaxi = TTF_OpenFont("game_over.ttf", 100);

    menu();

    TTF_CloseFont(policeMini);
    TTF_CloseFont(policeMaxi);
    TTF_Quit();
    SDL_Quit();

    return EXIT_SUCCESS;
}
