Esempio n. 1
0
//
// D_Shutdown
//
// Called to shutdown subsystems when unloading a set of WAD resource files.
// Should be called prior to D_Init when loading a new set of WADs.
//
void STACK_ARGS D_Shutdown()
{
	if (gamestate == GS_LEVEL)
		G_ExitLevel(0, 0);

	// [ML] 9/11/10: Reset custom wad level information from MAPINFO et al.
	for (size_t i = 0; i < wadlevelinfos.size(); i++)
	{
		if (wadlevelinfos[i].snapshot)
		{
			delete wadlevelinfos[i].snapshot;
			wadlevelinfos[i].snapshot = NULL;
		}
	}

	wadlevelinfos.clear();
	wadclusterinfos.clear();

	F_EndFinale();

	ST_Shutdown();

	R_ShutdownViewBorder();

	// stop sound effects and music
	S_Stop();
	
	// shutdown automap
	AM_Stop();

	DThinker::DestroyAllThinkers();

	UndoDehPatch();

	GStrings.FreeData();

	// close all open WAD files
	W_Close();

	V_UnloadFonts();

	R_Shutdown();

	HU_Shutdown();

	C_ShutdownConsoleBackground();

	R_ShutdownTextureManager();

	// reset the Zone memory manager
	Z_Close();
}
Esempio n. 2
0
void D_DoomDeinit(void)
{
  lprintf(LO_INFO,"D_DoomDeinit:\n");
  //Deinit
  M_QuitDOOM(0);
  Z_Close();
#ifdef HAVE_NET
  D_QuitNetGame();
  I_ShutdownNetwork();
#endif
  M_SaveDefaults ();
  W_Exit();
  I_ShutdownSound();
  I_ShutdownMusic();
  p_checksum_cleanup();
}