예제 #1
0
void __stdcall TerminateGameEngine()
{
	if(pMechlopedia)
		delete pMechlopedia;
	if(userInput)
		delete userInput;
	if(soundSystem)
		delete soundSystem;
	if(pLogData)
		delete pLogData;
	//------------------------------------------------
	// shutdown the MC Texture Manager.
	if(mcTextureManager)
	{
		mcTextureManager->destroy();
		delete mcTextureManager;
		mcTextureManager = nullptr;
	}
	//--------------------------------------------------------------
	// End the SystemHeap and globalHeapList
	if(systemHeap)
	{
		systemHeap->destroy();
		delete systemHeap;
		systemHeap = nullptr;
	}
	if(globalHeapList)
	{
		globalHeapList->destroy();
		delete globalHeapList;
		globalHeapList = nullptr;
	}
	//----------------------------------------------------
	// Shutdown the MLR and associated stuff libraries
	//----------------------------------------------------
	gos_PushCurrentHeap(gosFX::Heap);
	delete effectStream;
	delete gosFX::LightManager::Instance;
	gos_PopCurrentHeap();
	//
	//-------------------
	// Turn off libraries
	//-------------------
	//
	gosFX::TerminateClasses();
	MidLevelRenderer::TerminateClasses();
	Stuff::TerminateClasses();
	//Redundant. Something else is shutting this down.
	//GOS sure does think its bad to delete something multiple times though.
	//Even though it simply never is!
	//gos_DeleteFont(gosFontHandle);
	gos_CloseResourceDLL(gosResourceHandle);
	//
	//--------------------------
	// Turn off the fast Files
	//--------------------------
	//
	FastFileFini();
}
예제 #2
0
void TerminateGameEngine()
{
	gosScript_ShutdownProcessor();

	//---------------------------------------------------------
	// End the Mission, Operation and Logistics classes here
	if (logistics)
	{
		logistics->destroy();
		delete logistics;
		logistics = NULL;
	}

	//-------------------------------------------------------------
	// Shut down the soundSytem for a change!
	//if (soundSystem)
	//{
	//	soundSystem->destroy();
	//
	//	delete soundSystem;
	//	soundSystem = NULL;
	//}

	//------------------------------------------------
	// shutdown the MC Texture Manager.
	if (mcTextureManager)
	{
		mcTextureManager->destroy();

		delete mcTextureManager;
		mcTextureManager = NULL;
	}

	//--------------------------------------------------------------
	// End the SystemHeap and globalHeapList
	if (systemHeap)
	{
		systemHeap->destroy();

		delete systemHeap;
		systemHeap = NULL;
	}

	if (globalHeapList)
	{
		globalHeapList->destroy();

		delete globalHeapList;
		globalHeapList = NULL;
	}

	//----------------------------------------------------
	// Shutdown the MLR and associated stuff libraries
	//----------------------------------------------------

	//
	//-------------------
	// Turn off libraries
	//-------------------
	//
	Stuff::TerminateClasses();

	//Redundant.  Something else is shutting this down.
	//GOS sure does think its bad to delete something multiple times though.
	//Even though it simply never is!
	//gos_DeleteFont(gosFontHandle);

	gos_CloseResourceDLL(gosResourceHandle);

	//
	//--------------------------
	// Turn off the fast Files
	//--------------------------
	//
	FastFileFini();
}