summaryrefslogtreecommitdiff
path: root/src/doom/wi_stuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/wi_stuff.c')
-rw-r--r--src/doom/wi_stuff.c34
1 files changed, 24 insertions, 10 deletions
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);
+ }
}