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

#ifndef PreloadState_H
#define PreloadState_H

#include <Ogre.h>
#include <OIS.h>
#include <CEGUI.h>
#include <RendererModules/Ogre/CEGUIOgreRenderer.h>

#include "GameState.h"

class PreloadState : public Ogre::Singleton<PreloadState>, public GameState
{

public:
    PreloadState() {}

    void enter ();
    void exit ();
    void pause ();
    void resume ();

    void keyPressed (const OIS::KeyEvent &e);
    void keyReleased (const OIS::KeyEvent &e);
    void mouseMoved (const OIS::MouseEvent &e);
    void mousePressed (const OIS::MouseEvent &e, OIS::MouseButtonID id);
    void mouseReleased (const OIS::MouseEvent &e, OIS::MouseButtonID id);

    bool frameStarted (const Ogre::FrameEvent& evt);
    bool frameEnded (const Ogre::FrameEvent& evt);

    // Heredados de Ogre::Singleton.
    static PreloadState& getSingleton ();
    static PreloadState* getSingletonPtr ();

    // Específicos de scene
    Ogre::RenderWindow *_window;
    Ogre::SceneManager *_sceneManager;

    OIS::InputManager *_inputManager;
    OIS::Keyboard *_keyboard;
    OIS::Mouse *_mouse;

    CEGUI::OgreRenderer *_guiRenderer;

protected:
    Ogre::Root* _root;
    Ogre::SceneManager* _sceneMgr;
    Ogre::Viewport* _viewport;
    Ogre::Camera* _camera;

    bool _exitGame;
};

#endif
