diff --git a/src/doom/deh_bexpars.c b/src/doom/deh_bexpars.c index c9e1c8784..57711f308 100644 --- a/src/doom/deh_bexpars.c +++ b/src/doom/deh_bexpars.c @@ -21,7 +21,7 @@ #include "deh_io.h" -int bex_pars[4][10] = {{0}}; +int bex_pars[7][10] = {{0}}; int bex_cpars[32] = {0}; static void *DEH_BEXParsStart(deh_context_t *context, char *line) @@ -42,7 +42,7 @@ static void DEH_BEXParsParseLine(deh_context_t *context, char *line, void *tag) if (sscanf(line, "par %32d %32d %32d", &episode, &map, &partime) == 3) { - if (episode >= 1 && episode <= 3 && map >= 1 && map <= 9) + if (episode >= 1 && episode <= 6 && map >= 1 && map <= 9) bex_pars[episode][map] = partime; else { diff --git a/src/doom/deh_bexpars.h b/src/doom/deh_bexpars.h index 220fd4822..bf60031ba 100644 --- a/src/doom/deh_bexpars.h +++ b/src/doom/deh_bexpars.h @@ -19,5 +19,5 @@ #pragma once -extern int bex_pars[6][10]; +extern int bex_pars[7][10]; extern int bex_cpars[32]; diff --git a/src/doom/g_game.c b/src/doom/g_game.c index e0cd6ce69..7519f4124 100644 --- a/src/doom/g_game.c +++ b/src/doom/g_game.c @@ -1410,12 +1410,15 @@ void G_ScreenShot (void) // DOOM Par Times -static const int pars[4][10] = +static const int pars[7][10] = { {0}, - {0, 30, 75, 120, 90, 165, 180, 180, 30, 165}, // Episode 1 - {0, 90, 90, 90, 120, 90, 360, 240, 30, 170}, // Episode 2 - {0, 90, 45, 90, 150, 90, 90, 165, 30, 135} // Episode 3 + {0, 30, 75, 120, 90, 165, 180, 180, 30, 165}, // Episode 1 + {0, 90, 90, 90, 120, 90, 360, 240, 30, 170}, // Episode 2 + {0, 90, 45, 90, 150, 90, 90, 165, 30, 135}, // Episode 3 + {0, 165, 255, 135, 150, 180, 390, 135, 360, 180}, // [crispy] Episode 4 par times from the BFG Edition + {0, 90, 150, 360, 420, 780, 420, 780, 300, 660}, // [JN] Episode 5 par times from Sigil v1.21 + {0, 480, 300, 240, 420, 510, 840, 960, 390, 450} // [Dasperal] Episode 6 par times from Sigil II v1.0 }; // DOOM II Par Times @@ -1427,24 +1430,6 @@ static const int cpars[32] = 120, 30 // 31-32 }; -// [crispy] Episode 4 par times from the BFG Edition -static const int e4pars[10] = -{ - 0, 165, 255, 135, 150, 180, 390, 135, 360, 180 -}; - -// [JN] Sigil par times -static const int e5pars[10] = -{ - 0, 90, 150, 360, 420, 780, 420, 780, 300, 660 -}; - -// [Dasperal] Sigil 2 par times -static const int e6pars[10] = -{ - 0, 480, 300, 240, 420, 510, 840, 960, 390, 450 -}; - // [JN] Press Beta Par Times static const int bpars[4][10] = { @@ -1639,6 +1624,7 @@ void G_DoCompleted (void) switch (gameepisode) { case 1: + case 6: // [Dasperal] Sigil 2 wminfo.next = 3; break; case 2: @@ -1653,9 +1639,6 @@ void G_DoCompleted (void) case 5: // [crispy] Sigil wminfo.next = 6; break; - case 6: // [Dasperal] Sigil 2 - wminfo.next = 3; - break; } } @@ -1690,29 +1673,20 @@ void G_DoCompleted (void) wminfo.partime = TICRATE*cpars[gamemap-1]; } } - else if (gameepisode < 4) + else if(gameepisode < 4 + || (gameepisode == 4 && singleplayer) + || gameepisode == 5 + || gameepisode == 6) { // [crispy] support [PARS] sections in BEX files - if (bex_pars[gameepisode][gamemap]) + if(bex_pars[gameepisode][gamemap]) { wminfo.partime = TICRATE*bex_pars[gameepisode][gamemap]; } else - wminfo.partime = TICRATE*pars[gameepisode][gamemap]; - } - else if (gameepisode == 4 && singleplayer) - { - wminfo.partime = TICRATE*e4pars[gamemap]; - } - else if (gameepisode == 5) - { - // [JN] Sigil - wminfo.partime = TICRATE*e5pars[gamemap]; - } - else if (gameepisode == 6) - { - // [Dasperal] Sigil 2 - wminfo.partime = TICRATE*e6pars[gamemap]; + { + wminfo.partime = TICRATE * pars[gameepisode][gamemap]; + } } else { diff --git a/src/doom/wi_stuff.c b/src/doom/wi_stuff.c index ce8ca4086..ecff954b2 100644 --- a/src/doom/wi_stuff.c +++ b/src/doom/wi_stuff.c @@ -1769,7 +1769,10 @@ static void WI_drawStats (void) WI_drawTime((origwidth/2 - SP_TIMEX)+wide_delta, SP_TIMEY, cnt_time, true); - if (wbs->epsd < 4+1+1) // [JN] Sigil + Sigil 2: extra episodes + if(wbs->epsd < 3 + || (wbs->epsd == 3 && singleplayer) // [crispy] Episode 4 + || wbs->epsd == 4 // [crispy] Sigil + || wbs->epsd == 5) // [crispy] Sigil 2 { V_DrawShadowedPatchDoom(origwidth/2 + SP_TIMEX, SP_TIMEY, english_language ? par : par_rus);