MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / exitGame

Method exitGame

TheForceEngine/TFE_DarkForces/darkForcesMain.cpp:349–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347 }
348
349 void DarkForces::exitGame()
350 {
351 if (s_sharedState.gameStarted)
352 {
353 saveLevelStatus();
354 }
355 freeAllMidi();
356
357 gameMessage_freeBuffer();
358 briefingList_freeBuffer();
359 cutsceneList_freeBuffer();
360 cutsceneFilm_reset();
361 lsystem_destroy();
362 bitmap_clearAll();
363
364 // Clear paths and archives.
365 TFE_Paths::clearSearchPaths();
366 TFE_Paths::clearLocalArchives();
367 task_shutdown();
368
369 // Sound is destroyed after the task system.
370 sound_close();
371 config_shutdown();
372
373 // TFE Specific
374 // Reset state
375 actor_exitState();
376 weapon_resetState();
377 renderer_resetState();
378 agentMenu_resetState();
379 menu_resetState();
380 pda_resetState();
381 escapeMenu_resetState();
382 vue_resetState();
383 lsystem_destroy();
384 hud_reset();
385
386 // TFE
387 TFE_Sprite_Jedi::freeAll();
388 TFE_Model_Jedi::freeAll();
389 reticle_enable(false);
390 texturepacker_reset();
391 freeLevelScript();
392
393 TFE_MidiPlayer::resume();
394 TFE_Audio::resume();
395
396 TFE_Jedi::renderer_destroy();
397
398 // Reset state.
399 s_sharedState = SharedGameState{};
400 s_runGameState = {};
401
402 // TFE - Script system.
403 TFE_ScriptInterface::reset();
404 }
405
406 void DarkForces::pauseGame(bool pause)

Callers

nothing calls this directly

Calls 15

saveLevelStatusFunction · 0.85
freeAllMidiFunction · 0.85
gameMessage_freeBufferFunction · 0.85
briefingList_freeBufferFunction · 0.85
cutsceneList_freeBufferFunction · 0.85
cutsceneFilm_resetFunction · 0.85
lsystem_destroyFunction · 0.85
bitmap_clearAllFunction · 0.85
task_shutdownFunction · 0.85
sound_closeFunction · 0.85
config_shutdownFunction · 0.85
actor_exitStateFunction · 0.85

Tested by

no test coverage detected