Move all the leftovers of the "title" print code into D_Titlebar, since it's only used by DOS now

This commit is contained in:
Monster Iestyn 2017-06-24 18:39:17 +01:00
parent 9d24186ecd
commit b2941087de

View file

@ -883,27 +883,10 @@ static void IdentifyVersion(void)
#endif #endif
} }
/* ======================================================================== */
// Just print the nice red titlebar like the original SRB2 for DOS.
/* ======================================================================== */
#ifdef PC_DOS #ifdef PC_DOS
static inline void D_Titlebar(char *title1, char *title2) /* ======================================================================== */
{ // Code for printing SRB2's title bar in DOS
// SRB2 banner /* ======================================================================== */
clrscr();
textattr((BLUE<<4)+WHITE);
clreol();
cputs(title1);
// standard srb2 banner
textattr((RED<<4)+WHITE);
clreol();
gotoxy((80-strlen(title2))/2, 2);
cputs(title2);
normvideo();
gotoxy(1,3);
}
#endif
// //
// Center the title string, then add the date and time of compilation. // Center the title string, then add the date and time of compilation.
@ -932,6 +915,31 @@ static inline void D_MakeTitleString(char *s)
strcpy(s, temp); strcpy(s, temp);
} }
static inline void D_Titlebar(void)
{
char srb2[82]; // srb2 title banner
char title[82];
strcpy(title1, "Sonic Robo Blast 2");
strcpy(title2, "Sonic Robo Blast 2");
D_MakeTitleString(title1);
// SRB2 banner
clrscr();
textattr((BLUE<<4)+WHITE);
clreol();
cputs(title1);
// standard srb2 banner
textattr((RED<<4)+WHITE);
clreol();
gotoxy((80-strlen(title2))/2, 2);
cputs(title2);
normvideo();
gotoxy(1,3);
}
#endif
// //
// D_SRB2Main // D_SRB2Main
@ -939,8 +947,6 @@ static inline void D_MakeTitleString(char *s)
void D_SRB2Main(void) void D_SRB2Main(void)
{ {
INT32 p; INT32 p;
char srb2[82]; // srb2 title banner
char title[82];
INT32 pstartmap = 1; INT32 pstartmap = 1;
boolean autostart = false; boolean autostart = false;
@ -983,12 +989,8 @@ void D_SRB2Main(void)
dedicated = M_CheckParm("-dedicated") != 0; dedicated = M_CheckParm("-dedicated") != 0;
#endif #endif
strcpy(title, "Sonic Robo Blast 2");
strcpy(srb2, "Sonic Robo Blast 2");
D_MakeTitleString(srb2);
#ifdef PC_DOS #ifdef PC_DOS
D_Titlebar(srb2, title); D_Titlebar();
#endif #endif
if (devparm) if (devparm)