/***********************************************************
 * God Mode On, Und[0]ne Devs < http://undonedevs.tk >
 * 2013 Pepe Romero < wizardpepe@gmail.com >
 * < https://bitbucket.org/undone_devs/god-mode-on >
 ***********************************************************/

#define UNUSED_VARIABLE(x) (void)x

#include "GameManager.h"
#include "PreloadState.h"
#include "MenuState.h"
#include "LevelsState.h"
#include "SetupState.h"
#include "AchievState.h"
#include "LoadingState.h"
#include "PlayState.h"
#include "CreditsState.h"

#include <iostream>

int main() {

    GameManager* game = new GameManager();
    PreloadState* preloadState = new PreloadState();
    MenuState* menuState = new MenuState();
    LevelsState* levelsState = new LevelsState();
    SetupState* setupState = new SetupState();
    AchievState* achievState = new AchievState();
    LoadingState* loadingState = new LoadingState();
    PlayState* playState = new PlayState();
    CreditsState* creditsState = new CreditsState();

    UNUSED_VARIABLE(preloadState);
    UNUSED_VARIABLE(menuState);
    UNUSED_VARIABLE(levelsState);
    UNUSED_VARIABLE(setupState);
    UNUSED_VARIABLE(achievState);
    UNUSED_VARIABLE(loadingState);
    UNUSED_VARIABLE(playState);
    UNUSED_VARIABLE(creditsState);

    try
    {
        // Comienza el juego y carga el primer estado.
        game->start(PreloadState::getSingletonPtr());
    }
    catch (Ogre::Exception& e)
    {
        std::cerr << "An exception has occured: " << e.getFullDescription();
    }

    delete game;

    return 0;
}
