From b2941087de095e51e5c0f8ec33dcb4af7ae25697 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 24 Jun 2017 18:39:17 +0100 Subject: [PATCH] Move all the leftovers of the "title" print code into D_Titlebar, since it's only used by DOS now --- src/d_main.c | 56 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index e2813f5e1..007a14c1d 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -883,27 +883,10 @@ static void IdentifyVersion(void) #endif } -/* ======================================================================== */ -// Just print the nice red titlebar like the original SRB2 for DOS. -/* ======================================================================== */ #ifdef PC_DOS -static inline void D_Titlebar(char *title1, char *title2) -{ - // 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 +/* ======================================================================== */ +// Code for printing SRB2's title bar in DOS +/* ======================================================================== */ // // 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); } +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 @@ -939,8 +947,6 @@ static inline void D_MakeTitleString(char *s) void D_SRB2Main(void) { INT32 p; - char srb2[82]; // srb2 title banner - char title[82]; INT32 pstartmap = 1; boolean autostart = false; @@ -983,12 +989,8 @@ void D_SRB2Main(void) dedicated = M_CheckParm("-dedicated") != 0; #endif - strcpy(title, "Sonic Robo Blast 2"); - strcpy(srb2, "Sonic Robo Blast 2"); - D_MakeTitleString(srb2); - #ifdef PC_DOS - D_Titlebar(srb2, title); + D_Titlebar(); #endif if (devparm)