summaryrefslogtreecommitdiff
path: root/src/doom
diff options
context:
space:
mode:
authorSimon Howard2008-12-20 20:25:22 +0000
committerSimon Howard2008-12-20 20:25:22 +0000
commitb9b0c2abfbe194baf6d497f1c4a2165769f64ab3 (patch)
treea82b96f274bd7427b963964f37242607a27c593d /src/doom
parent0ec9859ec8cf39ce1223516161fb39ea44ed5c33 (diff)
parentacd1a13a4f70973d7616df3f6de43f8f79b8e392 (diff)
downloadchocolate-doom-b9b0c2abfbe194baf6d497f1c4a2165769f64ab3.tar.gz
chocolate-doom-b9b0c2abfbe194baf6d497f1c4a2165769f64ab3.tar.bz2
chocolate-doom-b9b0c2abfbe194baf6d497f1c4a2165769f64ab3.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 1423
Diffstat (limited to 'src/doom')
-rw-r--r--src/doom/d_main.c2
-rw-r--r--src/doom/wi_stuff.c34
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);
+ }
}