ref: 03eb55c8d43abc583efa3053e68b4a46e7c78b06
parent: 465a81132c5faeb4ec009e1590cc116a46fb776d
parent: e1f113aec7399f5625d8dc9bfa1a8e9816695c19
author: Mike Swanson <mikeonthecomputer@gmail.com>
date: Fri Mar 23 19:26:38 EDT 2018
Merge branch 'doom-map33-text' of gh:CapnClever/chocolate-doom
--- 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.
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1456,15 +1456,30 @@
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;
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@ -335,7 +335,13 @@
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 @@
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;
--- a/src/doom/wi_stuff.c
+++ b/src/doom/wi_stuff.c
@@ -430,7 +430,8 @@
}
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 @@
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);
+ }
}
}