Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion prboom2/src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,18 @@ void D_PageTicker(void)
D_AdvanceDemo();
}

// Check whether to skip IWAD Demos
static int dsda_SkipIwadDemos(void)
{
int pwaddemo = W_PWADLumpNameExists("DEMO1");
int pwadmaps = W_PWADLumpNameExists("THINGS");

if ((pwadmaps && !pwaddemo) || lumpinfo[W_CheckNumForName("DEMO1")].size == 0)
return true;

return false;
}

//
// D_PageDrawer
//
Expand Down Expand Up @@ -682,8 +694,10 @@ static void D_PageDrawer(void)
V_ClearBorder();
V_DrawNamePatchFS(0, 0, 0, pagename, CR_DEFAULT, VPT_STRETCH);
}
else
else if (dsda_SkipIwadDemos() && W_PWADLumpNameExists("CREDIT"))
M_DrawCredits();
else
M_DrawCreditsDynamic();
}

//
Expand Down Expand Up @@ -826,6 +840,17 @@ void D_DoAdvanceDemo(void)
if (demosequence == 6 && gamemode == commercial && !W_LumpNameExists("demo4"))
demosequence = 0;

if (dsda_SkipIwadDemos())
{
// Skip blank / IWAD demos in PWADs
if (demostates[demosequence][gamemode].func == G_DeferedPlayDemo)
demosequence++;

// Limit to just TITLEPIC / CREDIT
if (demosequence > (raven ? 3 : 2))
demosequence = 0;
}

demostates[demosequence][gamemode].func(demostates[demosequence][gamemode].name);
}

Expand Down
37 changes: 22 additions & 15 deletions prboom2/src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,17 @@ static void M_DrawReadThis1(void)

static void M_DrawReadThis2(void)
{
const char* helplump = (gamemode == commercial) ? "HELP" : "HELP1";
int pwadmaps = W_PWADLumpNameExists("THINGS"); // show help screen for IWAD

inhelpscreens = true;
M_DrawHelp();

if (W_PWADLumpNameExists(helplump) || !pwadmaps)
M_DrawHelp();
else if (W_PWADLumpNameExists("CREDIT"))
M_DrawCredits();
else
M_DrawCreditsDynamic();
}

/////////////////////////////
Expand Down Expand Up @@ -4427,22 +4436,20 @@ setup_menu_t cred_settings[]={

void M_DrawCredits(void) // killough 10/98: credit screen
{
const char* credit = "CREDIT";
const int PWADcredit = W_PWADLumpNameExists(credit);
inhelpscreens = true;

V_ClearBorder();
V_DrawNamePatchFS(0, 0, 0, "CREDIT", CR_DEFAULT, VPT_STRETCH);
}

void M_DrawCreditsDynamic(void) // Dynamic Credits
{
inhelpscreens = true;
if (PWADcredit || tc_game)
{
V_ClearBorder();
V_DrawNamePatchFS(0, 0, 0, credit, CR_DEFAULT, VPT_STRETCH);
}
else
{
// Use V_DrawBackground here deliberately to force drawing a background
V_DrawBackground(gamemode==shareware ? "CEIL5_1" : "MFLR8_4", 0);
M_DrawTitle(9, PROJECT_NAME " v" PROJECT_VERSION, cr_title); // PRBOOM
M_DrawScreenItems(cred_settings, 32);
}

// Use V_DrawBackground here deliberately to force drawing a background
V_DrawBackground(gamemode==shareware ? "CEIL5_1" : "MFLR8_4", 0);
M_DrawTitle(9, PROJECT_NAME " v" PROJECT_VERSION, cr_title); // PRBOOM
M_DrawScreenItems(cred_settings, 32);
}

static int M_IndexInChoices(const char *str, const char **choices) {
Expand Down
3 changes: 2 additions & 1 deletion prboom2/src/m_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ void M_ForcedLoadGame(const char *msg); // killough 5/15/98: forced loadgames

void M_ResetMenu(void); // killough 11/98: reset main menu ordering

void M_DrawCredits(void); // killough 11/98
void M_DrawCredits(void);
void M_DrawCreditsDynamic(void); // killough 11/98

void M_DrawTabs(const char **pages, int m, int y);

Expand Down
Loading