MCPcopy Create free account
hub / github.com/ZDoom/Raze / FGenericStartScreen

Method FGenericStartScreen

source/common/startscreen/startscreen_generic.cpp:71–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69//==========================================================================
70
71FGenericStartScreen::FGenericStartScreen(int max_progress)
72 : FStartScreen(max_progress)
73{
74 // at this point we do not have a working texture manager yet, so we have to do the lookup via the file system
75 int startup_lump = fileSystem.CheckNumForName("BOOTLOGO", FileSys::ns_graphics);
76
77 StartupBitmap.Create(640 * 2, 480 * 2);
78 ClearBlock(StartupBitmap, { 0, 0, 0, 255 }, 0, 0, 640 * 2, 480 * 2);
79 // This also needs to work if the lump turns out to be unusable.
80 if (startup_lump != -1)
81 {
82 auto iBackground = FImageSource::GetImage(startup_lump, false);
83 if (iBackground)
84 {
85 Background = iBackground->GetCachedBitmap(nullptr, FImageSource::normal);
86 if (Background.GetWidth() < 640 * 2 || Background.GetHeight() < 480 * 2)
87 StartupBitmap.Blit(320 * 2 - Background.GetWidth()/2, 220 * 2 - Background.GetHeight() / 2, Background);
88 else
89 StartupBitmap.Blit(0, 0, Background, 640 * 2, 480 * 2);
90
91 }
92 }
93}
94
95//==========================================================================
96//

Callers

nothing calls this directly

Calls 6

GetCachedBitmapMethod · 0.80
BlitMethod · 0.80
CheckNumForNameMethod · 0.45
CreateMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected