ref: 7eb3ddafc8ab557cb8828de390ca8415b6705bdf
parent: 6f116526d85e09a762ed1a7b295f684926c862ba
author: Simon Howard <fraggle@gmail.com>
date: Mon Oct 13 17:19:17 EDT 2008
Perform necessary shutdown tasks on exit of Hexen. Subversion-branch: /branches/raven-branch Subversion-revision: 1357
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -207,6 +207,13 @@
return (gamestate == GS_LEVEL) && !demoplayback;
}
+// Message displayed when quitting Hexen
+
+static void D_HexenQuitMessage(void)
+{
+ printf("\nHexen: Beyond Heretic\n");
+}
+
//==========================================================================
//
// H2_Main
@@ -218,6 +225,7 @@
{
int p;
+ I_AtExit(D_HexenQuitMessage, false);
M_FindResponseFile();
setbuf(stdout, NULL);
startepisode = 1;
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -37,6 +37,8 @@
#define DEFAULT_ARCHIVEPATH "o:\\sound\\archive\\"
+void S_ShutDown(void);
+
boolean i_CDMusic;
int i_CDTrack;
int i_CDCurrentTrack;
@@ -733,6 +735,8 @@
snd_Channels = 8;
}
I_SetMusicVolume(snd_MusicVolume);
+
+ I_AtExit(S_ShutDown, true);
#ifdef CDMUSIC
//TODO