#include "game/UGStaticData.h"
#include "scene/UGTitleScene.h"
//#include "scene/UGGameScene.h"
//#include "scene/UGOptionScene.h"

#ifdef _DEV_CPP_
#undef main
#endif
UGStaticData* staticData = NULL;


int main(int argc, char** argv){

	staticData = new UGStaticData();

	///////////
	// シーン作成
	staticData->setupWindow();

	UGPlayer* player = staticData->getObjectManager()->getPlayer();
	player->setCenter(100,100);


	HPLSceneManager* sceneManager = staticData->getSceneManager();

	//タイトル
	sceneManager->putScene(UGEnum::SceneType::Title, new UGTitleScene());
//	sceneManager->putScene(UGEnum::SceneType::Game, new UGGameScene());
//	sceneManager->putScene(UGEnum::SceneType::Option, new UGOptionScene());
	sceneManager->setScene(UGEnum::SceneType::Title);
	
	//////
	// マップ読み込み
	staticData->setupMap(0);


	while(staticData->isRunning()){

		sceneManager->processScene();
		
		staticData->processFadeOut();

		// event
		staticData->doEvent();

		// common
		staticData->doCommonLoopProcess();
	}

	delete staticData;

	return 0;
}
