/*****************************/
/* Inside The Machine - MKS  */
/*****************************/

//Includes
#ifndef _WORLDSTATE_H
#define _WORLDSTATE_H

#include "Engine.h"
#include "WorldManager.h"

class CWorldManager;
class WorldState : public CGameState
{
	public:
      void Init();
      void Cleanup();

      void Pause();
      void Resume();

      void HandleEvents(StateManager * game);
      void Update(StateManager * game);
      void Draw(StateManager * game);

      static WorldState* Instance()
      {
         return &m_WorldState;
      }
      
      void FadeWhite();
      void UnFadeWhite();
      void Splash();
      void Load();
      
		   //WorldManager
      CWorldManager* worldMan;
      int level;
	protected:
      WorldState() { }

	private:
      static WorldState m_WorldState;
      
      bool isFadingWhite, isUnFadingWhite;
      int fadeWhiteVal, fadeUnWhiteVal;
			//Transition depuis le menu
		u8 alphaFade;
		bool stopFade;
			//Variables du levelsplash
	   bool isSplashActive;          //Si le splashscreen est activé
	   int splashTimer;              //Timer du splashscreen
	   int splashPosX;               //Position x du splash
};

#endif
