From adc6a405ba0d2b77cf227184044186a84a971161 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 25 Sep 2008 19:31:14 +0000 Subject: Make ENDOOM screen work on Heretic. Subversion-branch: /branches/raven-branch Subversion-revision: 1284 --- src/heretic/d_main.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/heretic') diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 94d51851..54d51238 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -60,6 +60,8 @@ boolean advancedemo; FILE *debugfile; +static int show_endoom = 1; + void D_CheckNetGame(void); void D_ProcessEvents(void); void G_BuildTiccmd(ticcmd_t * cmd); @@ -746,6 +748,7 @@ void D_BindVariables(void) M_BindVariable("music_volume", &snd_MusicVolume); M_BindVariable("screenblocks", &screenblocks); M_BindVariable("snd_channels", &snd_Channels); + M_BindVariable("show_endoom", &show_endoom); for (i=0; i<10; ++i) { @@ -756,6 +759,26 @@ void D_BindVariables(void) } } +// +// Called at exit to display the ENDOOM screen (ENDTEXT in Heretic) +// + +static void D_Endoom(void) +{ + byte *endoom_data; + + // Disable ENDOOM? + + if (!show_endoom) + { + return; + } + + endoom_data = W_CacheLumpName("ENDTEXT", PU_STATIC); + + I_Endoom(endoom_data); +} + //--------------------------------------------------------------------------- // // PROC D_DoomMain @@ -771,7 +794,8 @@ void D_DoomMain(void) char file[256]; FILE *fp; boolean devMap; - //char *screen; + + I_AtExit(D_Endoom, false); M_FindResponseFile(); setbuf(stdout, NULL); -- cgit v1.2.3