diff --git a/NEWS.md b/NEWS.md index 203093ba..850b30db 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,10 @@ unmaintained in general, resulting in a very difficult process to get up to speed using this IDE and Chocolate Doom. +### Doom + * Map33 intermission screen and map33-map35 automap names are + emulated. (thanks CapnClever) + ### Hexen * ACS code has been hardened against potential security vulnerabilities. diff --git a/src/doom/g_game.c b/src/doom/g_game.c index a5347edf..5845a457 100644 --- a/src/doom/g_game.c +++ b/src/doom/g_game.c @@ -1456,15 +1456,30 @@ void G_DoCompleted (void) wminfo.maxsecret = totalsecret; wminfo.maxfrags = 0; - // Set par time. Doom episode 4 doesn't have a par time, so this - // overflows into the cpars array. It's necessary to emulate this - // for statcheck regression testing. + // Set par time. Exceptions are added for purposes of + // statcheck regression testing. if (gamemode == commercial) - wminfo.partime = TICRATE*cpars[gamemap-1]; + { + // map33 has no official time: initialize to zero + if (gamemap == 33) + { + wminfo.partime = 0; + } + else + { + wminfo.partime = TICRATE*cpars[gamemap-1]; + } + } + // Doom episode 4 doesn't have a par time, so this + // overflows into the cpars array. else if (gameepisode < 4) - wminfo.partime = TICRATE*pars[gameepisode][gamemap]; + { + wminfo.partime = TICRATE*pars[gameepisode][gamemap]; + } else + { wminfo.partime = TICRATE*cpars[gamemap]; + } wminfo.pnum = consoleplayer; diff --git a/src/doom/hu_stuff.c b/src/doom/hu_stuff.c index e21f7009..4f985f8f 100644 --- a/src/doom/hu_stuff.c +++ b/src/doom/hu_stuff.c @@ -335,7 +335,13 @@ char *mapnames_commercial[] = THUSTR_29, THUSTR_30, THUSTR_31, - THUSTR_32 + THUSTR_32, + + // Emulation: TNT maps 33-35 can be warped to and played if they exist + // so include blank names instead of spilling over + "", + "", + "" }; void HU_Init(void) @@ -394,6 +400,11 @@ void HU_Start(void) break; case doom2: s = HU_TITLE2; + // Pre-Final Doom compatibility: map33-map35 names don't spill over + if (gameversion <= exe_doom_1_9 && gamemap >= 33) + { + s = ""; + } break; case pack_plut: s = HU_TITLEP; diff --git a/src/doom/wi_stuff.c b/src/doom/wi_stuff.c index 1d6466bb..cff0d9ac 100644 --- a/src/doom/wi_stuff.c +++ b/src/doom/wi_stuff.c @@ -430,7 +430,8 @@ void WI_drawLF(void) } else if (wbs->last == NUMCMAPS) { - // MAP33 - nothing is displayed! + // MAP33 - draw "Finished!" only + V_DrawPatch((SCREENWIDTH - SHORT(finished->width)) / 2, y, finished); } else if (wbs->last > NUMCMAPS) { @@ -1472,8 +1473,13 @@ void WI_drawStats(void) if (wbs->epsd < 3) { - V_DrawPatch(SCREENWIDTH/2 + SP_TIMEX, SP_TIMEY, par); - WI_drawTime(SCREENWIDTH - SP_TIMEX, SP_TIMEY, cnt_par); + V_DrawPatch(SCREENWIDTH/2 + SP_TIMEX, SP_TIMEY, par); + + // Emulation: don't draw partime value if map33 + if (gamemode != commercial || wbs->last != NUMCMAPS) + { + WI_drawTime(SCREENWIDTH - SP_TIMEX, SP_TIMEY, cnt_par); + } } }