コード例 #1
0
//-----------------------------------------------------------------------------
void ExampleShutDown()
{
    delete IwGetUIController();
    delete IwGetUIView();

    //Terminate the IwUI module
    IwUITerminate();
}
コード例 #2
0
ファイル: FireflyMain.cpp プロジェクト: nbclark/firefly-mp
int main()
{
	
	//s3eInetAddress addr;
	//memset(&addr, 0, sizeof(addr));
	//s3eInetLookup("localhost", &addr, NULL, NULL);
	//addr.m_Port = s3eInetHtons(81);

	//s3eSocket* pSock = s3eSocketCreate(S3E_SOCKET_UDP, 0);
	//char szData[20000];
	//for (int i=0; i <20000;++i)
	//{
	//	szData[i] = i;
	//}
	//while (true)
	//{
	//	int sent = s3eSocketSendTo(pSock, szData, 20000, 0, &addr);
	//	s3eDeviceYield(0);
	//}

	s3eLocationStart();

	//IwGx can be initialised in a number of different configurations to help the linker eliminate unused code.
	//For the examples we link in all of IwGx's possible functionality.
	//You can see the code size reduce if you remove any of the IwGxInit calls following IwGxInit_Base.
	//Note that, for demonstration purposes, some examples call IwGxInit() themselves - this will link in the 
	//standard renderer and the GL renderer, so on those examples these features cannot be excluded from the build.
	//IwGxInit_Base();
	//IwGxInit_GLRender();
	IwGxInit();

	Iw2DInit();
	IwUIInit();

	//Instantiate the view and controller singletons.
	//IwUI will not instantiate these itself, since they can be subclassed to add functionality.
	new CIwUIView;
	CIwUIController2* pController = new CIwUIController2;

	IwDebugTraceLinePrintf("Creating Game Object");
	FireflyGameEngine* pGameEngine = new FireflyGameEngine;
	IwDebugTraceLinePrintf("Entering Main");
	int result = GameMain(pGameEngine);
	delete pGameEngine;

	Iw2DTerminate();
	
	delete IwGetUIView();
	delete pController;
	IwUITerminate();
	IwGxTerminate();
	s3eLocationStop();


	return result;
}