From 054394ecea3be49aa4ddfb5e86436e0d2bef3b43 Mon Sep 17 00:00:00 2001 From: Ben Lankamp Date: Sun, 14 Jun 2020 16:47:31 +0200 Subject: [PATCH] * Show version number --- code/REDALERT/GOPTIONS.CPP | 13 ------- code/REDALERT/GSCREEN.CPP | 16 +++----- code/REDALERT/MENUS.CPP | 76 +++++++++++++------------------------- code/REDALERT/MIXFILE.CPP | 4 +- code/REDALERT/SCENARIO.CPP | 8 +--- 5 files changed, 34 insertions(+), 83 deletions(-) diff --git a/code/REDALERT/GOPTIONS.CPP b/code/REDALERT/GOPTIONS.CPP index a43fe14..52ea362 100644 --- a/code/REDALERT/GOPTIONS.CPP +++ b/code/REDALERT/GOPTIONS.CPP @@ -320,17 +320,6 @@ void GameOptionsClass::Process(void) /* ** Display the version number at the bottom of the dialog box. */ -#ifndef WIN32 - Fancy_Text_Print("%s\rV%s", - (OptionX+OptionWidth)-(17 * RESFACTOR), - OptionY+OptionHeight-((Session.Type == GAME_NORMAL) ? (32 * RESFACTOR) : (24 * RESFACTOR)), - GadgetClass::Get_Color_Scheme(), TBLACK, - TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, - Scen.ScenarioName, - Version_Name()); - -#else -#if (0)//PG Fancy_Text_Print("%s\rV%s", (OptionX+OptionWidth)-(25 * RESFACTOR), OptionY+OptionHeight-((Session.Type == GAME_NORMAL) ? (32 * RESFACTOR) : (24 * RESFACTOR)), @@ -338,8 +327,6 @@ void GameOptionsClass::Process(void) TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, Scen.ScenarioName, Version_Name()); -#endif -#endif buttons->Draw_All(); TabClass::Hilite_Tab(0); diff --git a/code/REDALERT/GSCREEN.CPP b/code/REDALERT/GSCREEN.CPP index 73258e2..2ae655f 100644 --- a/code/REDALERT/GSCREEN.CPP +++ b/code/REDALERT/GSCREEN.CPP @@ -468,17 +468,11 @@ extern "C" { void GScreenClass::Blit_Display(void) { BStart(BENCH_BLIT_DISPLAY); - #ifdef WIN32 - if (SeenBuff.Get_Width()!=320) { - WWMouse->Draw_Mouse(&HidPage); - HidPage.Blit(SeenBuff , 0 , 0 , 0 , 0 , HidPage.Get_Width() , HidPage.Get_Height() , (BOOL) FALSE ); - WWMouse->Erase_Mouse(&HidPage, FALSE); - } else { - //PG ModeX_Blit(&HiddenPage); - } - #else - Shadow_Blit(0, 0, 320, 200, HidPage, SeenPage, ShadowPage->Get_Buffer()); - #endif + + WWMouse->Draw_Mouse(&HidPage); + HidPage.Blit(SeenBuff , 0 , 0 , 0 , 0 , HidPage.Get_Width() , HidPage.Get_Height() , (BOOL) FALSE ); + WWMouse->Erase_Mouse(&HidPage, FALSE); + BEnd(BENCH_BLIT_DISPLAY); } diff --git a/code/REDALERT/MENUS.CPP b/code/REDALERT/MENUS.CPP index 524d4e7..1dbc2e9 100644 --- a/code/REDALERT/MENUS.CPP +++ b/code/REDALERT/MENUS.CPP @@ -760,65 +760,41 @@ int Main_Menu(unsigned long ) Call_Back(); /* - ** Refresh display if needed. + ** Load the background picture. */ -// jmarshall - //if (display) { -// jmarshall end - /* - ** Load the background picture. - */ - Load_Title_Page(); - CCPalette.Set(); + Load_Title_Page(); + CCPalette.Set(); + + /* + ** Display the title and text overlay for the menu. + */ + Set_Logic_Page(HidPage); + commands->Draw_All(); - /* - ** Display the title and text overlay for the menu. - */ - Set_Logic_Page(HidPage); -// Dialog_Box(d_dialog_x, d_dialog_y, d_dialog_w, d_dialog_h); -// Draw_Caption (TXT_NONE, d_dialog_x, d_dialog_y, d_dialog_w); - commands->Draw_All(); #ifdef FIXIT_VERSION_3 -#if (0)//PG - Fancy_Text_Print("V%s", d_dialog_x+d_dialog_w- (18 * RESFACTOR), - d_dialog_y+d_dialog_h-(5 * RESFACTOR), GadgetClass::Get_Color_Scheme(), TBLACK, - TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, - Version_Name()); -#endif -#else -#ifndef WIN32 - Fancy_Text_Print("V%s", d_dialog_x+d_dialog_w- (18 * RESFACTOR), - d_dialog_y+d_dialog_h-(8 * RESFACTOR), GadgetClass::Get_Color_Scheme(), TBLACK, - TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, - Version_Name()); + + Fancy_Text_Print("V%s", d_dialog_x+d_dialog_w- (18 * RESFACTOR), + d_dialog_y+d_dialog_h-(5 * RESFACTOR), GadgetClass::Get_Color_Scheme(), TBLACK, + TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, + Version_Name()); #else - Fancy_Text_Print("V%s", d_dialog_x+d_dialog_w- (18 * RESFACTOR), - d_dialog_y+d_dialog_h-(11 * RESFACTOR), GadgetClass::Get_Color_Scheme(), TBLACK, - TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, - Version_Name()); + Fancy_Text_Print("V%s", d_dialog_x+d_dialog_w- (18 * RESFACTOR), + d_dialog_y+d_dialog_h-(11 * RESFACTOR), GadgetClass::Get_Color_Scheme(), TBLACK, + TPF_EFNT|TPF_NOSHADOW|TPF_RIGHT, + Version_Name()); -#endif #endif - /* - ** Copy the menu to the visible page. - */ - Hide_Mouse(); - HidPage.Blit(SeenPage); - Show_Mouse(); + /* + ** Copy the menu to the visible page. + */ + Hide_Mouse(); + HidPage.Blit(SeenPage); + Show_Mouse(); - Set_Logic_Page(SeenBuff); - display = false; -// jmarshall - //} - //else { - // if (RunningAsDLL) { //PG - // retval = -1; - // process = false; - // } - //} -// jmarshall end + Set_Logic_Page(SeenBuff); + display = false; /* ** Get and process player input. diff --git a/code/REDALERT/MIXFILE.CPP b/code/REDALERT/MIXFILE.CPP index b23630d..c3302ec 100644 --- a/code/REDALERT/MIXFILE.CPP +++ b/code/REDALERT/MIXFILE.CPP @@ -181,9 +181,7 @@ MixFileClass::MixFileClass(char const * filename, PKey const * key) : */ if (!Force_CD_Available(RequiredCD)) { Prog_End("MixFileClass Force_CD_Available failed", true); - if (!RunningAsDLL) { //PG - Emergency_Exit(EXIT_FAILURE); - } + Emergency_Exit(EXIT_FAILURE); } T file(filename); // Working file object. diff --git a/code/REDALERT/SCENARIO.CPP b/code/REDALERT/SCENARIO.CPP index 0d890b4..a523112 100644 --- a/code/REDALERT/SCENARIO.CPP +++ b/code/REDALERT/SCENARIO.CPP @@ -553,9 +553,7 @@ bool Read_Scenario(char * name) } #endif #endif - if (!RunningAsDLL) { //PG - Emergency_Exit(EXIT_FAILURE); - } + Emergency_Exit(EXIT_FAILURE); } } CCINIClass ini; @@ -2195,9 +2193,7 @@ bool Read_Scenario_INI(char * fname, bool ) #endif if (!Force_CD_Available(RequiredCD)) { Prog_End("Read_Scenario_INI Force_CD_Available failed", true); - if (!RunningAsDLL) { //PG - Emergency_Exit(EXIT_FAILURE); - } + Emergency_Exit(EXIT_FAILURE); } } else { /*