当前位置: 首页>>代码示例>>C++>>正文


C++ CInterfaceManager::createLocalBranch方法代码示例

本文整理汇总了C++中CInterfaceManager::createLocalBranch方法的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager::createLocalBranch方法的具体用法?C++ CInterfaceManager::createLocalBranch怎么用?C++ CInterfaceManager::createLocalBranch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CInterfaceManager的用法示例。


在下文中一共展示了CInterfaceManager::createLocalBranch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initMainLoop

//---------------------------------------------------
// initMainLoop :
// Initialize the main loop.
//
// If you add something in this function, check CFarTP,
// some kind of reinitialization might be useful over there.
//---------------------------------------------------
void initMainLoop()
{
	StartInitTime = NLMISC::CTime::getLocalTime();

	Driver->clearBuffers(CRGBA::Black);
	Driver->swapBuffers();
	CNiceInputAuto niceInputs;
	bool WantStartupProfiling = false;

#ifdef _PROFILE_ON_
	if( WantStartupProfiling )
	{
		// start the bench.
		NLMISC::CHTimer::startBench();
		Driver->startBench();
	}
#endif	// 	_PROFILE_ON_
{ // profile init mainloop

	H_AUTO ( RZ_Client_InitMainLoop );

	FPU_CHECKER_ONCE

	NLMISC::TTime initStart = ryzomGetLocalTime();
	NLMISC::TTime initLast = initStart;
	NLMISC::TTime initCurrent = initLast;

	// Progress bar for init_main_loop()
	ProgressBar.reset (BAR_STEP_INIT_MAIN_LOOP);
	ucstring nmsg;

	FPU_CHECKER_ONCE

	// Get the interface manager
	CInterfaceManager *pIM = CInterfaceManager::getInstance();

	{
		H_AUTO(RZUnInOut)
		pIM->uninitOutGame();
	}

	initLast = initCurrent;
	initCurrent = ryzomGetLocalTime();
	//nlinfo ("PROFILE: %d seconds (%d total) for Uninitializing outgame", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);

	// Create the game interface database
	{
		H_AUTO(InitRZDB)

		// Initialize the Database.
		nmsg = "Initializing XML Database ...";
		ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );

		IngameDbMngr.init(CPath::lookup("database.xml"), ProgressBar);
		ICDBNode::CTextId textId("SERVER");
		if( pIM->getDB()->getNode(textId, false) )
			pIM->getDB()->removeNode(textId);
		pIM->getDB()->attachChild(IngameDbMngr.getNodePtr(),"SERVER");

		// Set the database
		NetMngr.setDataBase (IngameDbMngr.getNodePtr());

		initLast = initCurrent;
		initCurrent = ryzomGetLocalTime();
		//nlinfo ("PROFILE: %d seconds (%d total) for Initializing XML database", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);
	}

	// Create interface database
	{
		H_AUTO(InitRZUI)

		// Initialize interface v3 should be done after IngameDbMngr.init()
		nmsg = "Initializing Interface Database ...";
		ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );

		// Add the LOCAL branch
		ICDBNode::CTextId textId("LOCAL");
		if( pIM->getDB()->getNode(textId, false) )
			pIM->getDB()->removeNode(textId);
		pIM->createLocalBranch(CPath::lookup("local_database.xml"), ProgressBar);

		initLast = initCurrent;
		initCurrent = ryzomGetLocalTime();
		//nlinfo ("PROFILE: %d seconds (%d total) for Initializing interface", (uint32)(initCurrent-initLast)/1000, (uint32)(initCurrent-initStart)/1000);
	}

	{
		// Ask and receive the user position to start (Olivier: moved here because needed by initInGame())
		nmsg = "Awaiting Start Position ...";
		ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
		waitForUserCharReceived();

		initLast = initCurrent;
//.........这里部分代码省略.........
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:101,代码来源:init_main_loop.cpp


注:本文中的CInterfaceManager::createLocalBranch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。