- Startscreen fixes.

* for Strife the game palette must be loaded before the start screen.
* increase update frequency of start screen to roughly 35 fps
* fixed Strife's laser sprite names.
* do not show the native progress bar if a graphical start screen is used.
This commit is contained in:
Christoph Oelckers 2022-06-01 09:30:20 +02:00
parent 344c6348fd
commit 7787a410ea
6 changed files with 10 additions and 8 deletions

View file

@ -39,7 +39,7 @@
class FStartupScreen class FStartupScreen
{ {
public: public:
static FStartupScreen *CreateInstance(int max_progress); static FStartupScreen *CreateInstance(int max_progress, bool showprogress);
FStartupScreen(int max_progress) FStartupScreen(int max_progress)
{ {

View file

@ -76,9 +76,9 @@ extern HINSTANCE g_hInst;
// //
//========================================================================== //==========================================================================
FStartupScreen *FStartupScreen::CreateInstance(int max_progress) FStartupScreen *FStartupScreen::CreateInstance(int max_progress, bool showprogress)
{ {
return new FBasicStartupScreen(max_progress, true); return new FBasicStartupScreen(max_progress, showprogress);
} }
//========================================================================== //==========================================================================

View file

@ -657,7 +657,7 @@ void FStartScreen::Render(bool force)
{ {
auto nowtime = I_msTime(); auto nowtime = I_msTime();
// Do not refresh too often. This function gets called a lot more frequently than the screen can update. // Do not refresh too often. This function gets called a lot more frequently than the screen can update.
if (nowtime - screen->FrameTime > 100 || force) if (nowtime - screen->FrameTime > 30 || force)
{ {
screen->FrameTime = nowtime; screen->FrameTime = nowtime;
screen->BeginFrame(); screen->BeginFrame();

View file

@ -37,6 +37,7 @@
#include "filesystem.h" #include "filesystem.h"
#include "printf.h" #include "printf.h"
#include "image.h" #include "image.h"
#include "textures.h"
#include "palettecontainer.h" #include "palettecontainer.h"
// Strife startup screen // Strife startup screen
@ -156,6 +157,7 @@ bool FStrifeStartScreen::DoProgress(int advance)
{ // Time to update. { // Time to update.
DrawStuff(NotchPos, notch_pos); DrawStuff(NotchPos, notch_pos);
NotchPos = notch_pos; NotchPos = notch_pos;
StartupTexture->CleanHardwareData(true);
} }
} }
return FStartScreen::DoProgress(advance); return FStartScreen::DoProgress(advance);

View file

@ -58,8 +58,8 @@ static StrifeStartupInfo StrifeRawPics[] =
{ "STRTPB1", 32, 64}, { "STRTPB1", 32, 64},
{ "STRTPC1", 32, 64}, { "STRTPC1", 32, 64},
{ "STRTPD1", 32, 64}, { "STRTPD1", 32, 64},
{ "STRLZ1", 16, 16}, { "STRTLZ1", 16, 16},
{ "STRLZ2", 16, 16}, { "STRTLZ2", 16, 16},
{ "STRTBOT", 48, 48} { "STRTBOT", 48, 48}
}; };

View file

@ -3068,6 +3068,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
SetMapxxFlag(); SetMapxxFlag();
D_GrabCVarDefaults(); //parse DEFCVARS D_GrabCVarDefaults(); //parse DEFCVARS
InitPalette();
int max_progress = TexMan.GuesstimateNumTextures(); int max_progress = TexMan.GuesstimateNumTextures();
int per_shader_progress = 0;//screen->GetShaderCount()? (max_progress / 10 / screen->GetShaderCount()) : 0; int per_shader_progress = 0;//screen->GetShaderCount()? (max_progress / 10 / screen->GetShaderCount()) : 0;
@ -3106,7 +3107,6 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
Printf("%s", ci.GetChars()); Printf("%s", ci.GetChars());
} }
InitPalette();
TexMan.Init(); TexMan.Init();
if (!batchrun) Printf ("V_Init: allocate screen.\n"); if (!batchrun) Printf ("V_Init: allocate screen.\n");
@ -3145,7 +3145,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
if (!batchrun) Printf ("ST_Init: Init startup screen.\n"); if (!batchrun) Printf ("ST_Init: Init startup screen.\n");
if (!restart) if (!restart)
{ {
StartWindow = FStartupScreen::CreateInstance (TexMan.GuesstimateNumTextures() + 5); StartWindow = FStartupScreen::CreateInstance (TexMan.GuesstimateNumTextures() + 5, StartScreen == nullptr);
} }
else else
{ {