MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ShutdownD3

Function ShutdownD3

Descent3/init.cpp:2100–2141  ·  view source on GitHub ↗

TODO: MTS: Unused in project

Source from the content-addressed store, hash-verified

2098
2099// TODO: MTS: Unused in project
2100void ShutdownD3() {
2101 if (!Init_systems_init)
2102 return;
2103
2104 mprintf(0, "Shutting down D3...\n");
2105
2106 // Close forcefeedback effects
2107 ForceShutdown();
2108
2109 // shutdown game systems
2110 Init_old_control_mode = Control_poll_flag;
2111
2112 // JEFF: only pause game if not in multi, so we can background process
2113 if (GetFunctionMode() == GAME_MODE) {
2114 if (!(Game_mode & GM_MULTI)) {
2115 Init_was_game_paused = Game_paused;
2116 if (!Init_was_game_paused) {
2117 PauseGame();
2118 } else {
2119 D3MusicPause();
2120 }
2121 }
2122 } else {
2123 D3MusicPause();
2124 Sound_system.PauseSounds();
2125 }
2126
2127 SaveControlConfig(&Init_old_pilot);
2128 CloseControls();
2129
2130 // shutdown cinematics.
2131
2132 // shutdown screen.
2133 Init_ui_cursor_visible = ui_IsCursorVisible();
2134 Init_old_screen_mode = GetScreenMode();
2135 Init_old_ui_callback = GetUICallback();
2136 SetScreenMode(SM_NULL);
2137 ddvid_Close();
2138
2139 // shutdown IO
2140 ddio_Close();
2141}
2142
2143// TODO: MTS: unused in project
2144// This function restarts all game systems

Callers

nothing calls this directly

Calls 12

ForceShutdownFunction · 0.85
GetFunctionModeFunction · 0.85
PauseGameFunction · 0.85
D3MusicPauseFunction · 0.85
SaveControlConfigFunction · 0.85
CloseControlsFunction · 0.85
ui_IsCursorVisibleFunction · 0.85
GetScreenModeFunction · 0.85
SetScreenModeFunction · 0.85
ddvid_CloseFunction · 0.85
ddio_CloseFunction · 0.85
PauseSoundsMethod · 0.45

Tested by

no test coverage detected