diff options
Diffstat (limited to 'src/doom')
-rw-r--r-- | src/doom/d_main.c | 2 | ||||
-rw-r--r-- | src/doom/wi_stuff.c | 34 |
2 files changed, 25 insertions, 11 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c index c8a91e74..70518a75 100644 --- a/src/doom/d_main.c +++ b/src/doom/d_main.c @@ -422,10 +422,10 @@ void D_DoomLoop (void) TryRunTics(); + I_SetWindowTitle(gamedescription); I_InitGraphics(); I_EnableLoadingDisk(); I_SetGrabMouseCallback(D_GrabMouseCallback); - I_SetWindowTitle(gamedescription); V_RestoreBuffer(); R_ExecuteSetViewSize(); diff --git a/src/doom/wi_stuff.c b/src/doom/wi_stuff.c index 7cfbdfa9..dea5d71b 100644 --- a/src/doom/wi_stuff.c +++ b/src/doom/wi_stuff.c @@ -424,17 +424,31 @@ void WI_drawLF(void) { int y = WI_TITLEY; - // draw <LevelName> - V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2, - y, - lnames[wbs->last]); + if (gamemode != commercial || wbs->last < NUMCMAPS) + { + // draw <LevelName> + V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2, + y, lnames[wbs->last]); - // draw "Finished!" - y += (5*SHORT(lnames[wbs->last]->height))/4; - - V_DrawPatch((SCREENWIDTH - SHORT(finished->width))/2, - y, - finished); + // draw "Finished!" + y += (5*SHORT(lnames[wbs->last]->height))/4; + } + else if (wbs->last == NUMCMAPS) + { + // MAP33 - nothing is displayed! + } + else if (wbs->last > NUMCMAPS) + { + // > MAP33. Doom bombs out here with a Bad V_DrawPatch error. + // I'm pretty sure that doom2.exe is just reading into random + // bits of memory at this point, but let's try to be accurate + // anyway. This deliberately triggers a V_DrawPatch error. + + patch_t tmp = { SCREENWIDTH, SCREENHEIGHT, 1, 1, + { 0, 0, 0, 0, 0, 0, 0, 0 } }; + + V_DrawPatch(0, y, &tmp); + } } |