summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-12-09 23:32:19 +0000
committerSimon Howard2008-12-09 23:32:19 +0000
commitb00b65538a1f7a04fdd46d7c193a7c59733fde9b (patch)
treefcf46f45b5c6ad6d39051df1564ac6ece5cfd17a
parentca3844dc5b138b19259e8dc9daaa397867834a5f (diff)
downloadchocolate-doom-b00b65538a1f7a04fdd46d7c193a7c59733fde9b.tar.gz
chocolate-doom-b00b65538a1f7a04fdd46d7c193a7c59733fde9b.tar.bz2
chocolate-doom-b00b65538a1f7a04fdd46d7c193a7c59733fde9b.zip
Make intermission screen work on MAP33, to be consistent with Vanilla
Doom. Also, make levels after MAP33 trigger a V_DrawPatch error. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1414
-rw-r--r--src/wi_stuff.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/wi_stuff.c b/src/wi_stuff.c
index 938d6915..238462de 100644
--- a/src/wi_stuff.c
+++ b/src/wi_stuff.c
@@ -427,13 +427,32 @@ void WI_drawLF(void)
{
int y = WI_TITLEY;
- // draw <LevelName>
- V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2,
- y, FB, lnames[wbs->last]);
+ if (wbs->last < NUMCMAPS)
+ {
+ // draw <LevelName>
+ V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2,
+ y, FB, lnames[wbs->last]);
+
+ // 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, FB, &tmp);
+ }
- // draw "Finished!"
- y += (5*SHORT(lnames[wbs->last]->height))/4;
-
V_DrawPatch((SCREENWIDTH - SHORT(finished->width))/2,
y, FB, finished);
}