/** * @sa R_Init */ void R_Shutdown (void) { const cmdList_t *commands; for (commands = r_commands; commands->name; commands++) Cmd_RemoveCommand(commands->name); R_ShutdownThreads(); R_ShutdownModels(true); R_ShutdownImages(); R_ShutdownPrograms(); R_FontShutdown(); R_ShutdownFBObjects(); /* shut down OS specific OpenGL stuff like contexts, etc. */ Rimp_Shutdown(); }
void TEST_Shutdown (void) { PTL_InitStartup(); R_ShutdownImages(); SV_Shutdown("test shutdown", false); FS_Shutdown(); UI_Shutdown(); Cmd_Shutdown(); developer = nullptr; Cvar_Shutdown(); Mem_Shutdown(); Com_Shutdown(); Cbuf_Shutdown(); NET_Shutdown(); com_aliasSysPool = nullptr; com_cmdSysPool = nullptr; com_cmodelSysPool = nullptr; com_cvarSysPool = nullptr; com_fileSysPool = nullptr; com_genericPool = nullptr; }
/* =============== CL_ChangeGame This is experiment. Use with precaution =============== */ qboolean CL_ChangeGame( const char *gamefolder, qboolean bReset ) { if( Host_IsDedicated() ) return false; if( Q_stricmp( host.gamefolder, gamefolder )) { kbutton_t *mlook, *jlook; qboolean mlook_active = false, jlook_active = false; string mapname, maptitle; int maxEntities; mlook = (kbutton_t *)clgame.dllFuncs.KB_Find( "in_mlook" ); jlook = (kbutton_t *)clgame.dllFuncs.KB_Find( "in_jlook" ); if( mlook && ( mlook->state & 1 )) mlook_active = true; if( jlook && ( jlook->state & 1 )) jlook_active = true; // so reload all images (remote connect) Mod_ClearAll( true ); R_ShutdownImages(); FS_LoadGameInfo( (bReset) ? host.gamefolder : gamefolder ); R_InitImages(); // save parms maxEntities = clgame.maxEntities; Q_strncpy( mapname, clgame.mapname, MAX_STRING ); Q_strncpy( maptitle, clgame.maptitle, MAX_STRING ); Com_ResetLibraryError(); if( !CL_LoadProgs( va( "%s/%s", GI->dll_path, GI->client_lib))) Sys_Warn( "Can't initialize client library\n%s", Com_GetLibraryError() ); // restore parms clgame.maxEntities = maxEntities; Q_strncpy( clgame.mapname, mapname, MAX_STRING ); Q_strncpy( clgame.maptitle, maptitle, MAX_STRING ); // invalidate fonts so we can reloading them again Q_memset( &cls.creditsFont, 0, sizeof( cls.creditsFont )); SCR_InstallParticlePalette(); SCR_LoadCreditsFont(); Con_InvalidateFonts(); SCR_RegisterTextures (); CL_FreeEdicts (); SCR_VidInit (); if( cls.key_dest == key_game ) // restore mouse state clgame.dllFuncs.IN_ActivateMouse(); // restore mlook state if( mlook_active ) Cmd_ExecuteString( "+mlook\n", src_command ); if( jlook_active ) Cmd_ExecuteString( "+jlook\n", src_command ); return true; } return false; }