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

Method FStrifeStartScreen

source/common/startscreen/startscreen_strife.cpp:105–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103//==========================================================================
104
105FStrifeStartScreen::FStrifeStartScreen(int max_progress)
106 : FStartScreen(max_progress)
107{
108 StartupBitmap.Create(320, 200);
109
110 // at this point we do not have a working texture manager yet, so we have to do the lookup via the file system
111 // Load the background and animated overlays.
112 for (size_t i = 0; i < countof(StrifeStartupPicNames); ++i)
113 {
114 int lumpnum = fileSystem.CheckNumForName(StrifeStartupPicNames[i], FileSys::ns_graphics);
115 if (lumpnum < 0) lumpnum = fileSystem.CheckNumForName(StrifeStartupPicNames[i]);
116
117 if (lumpnum >= 0)
118 {
119 auto lumpr1 = FImageSource::GetImage(lumpnum, false);
120 if (lumpr1) StartupPics[i] = lumpr1->GetCachedBitmap(nullptr, FImageSource::normal);
121 }
122 }
123 if (StartupPics[7].GetWidth() != 320 || StartupPics[7].GetHeight() != 200)
124 {
125 I_Error("bad startscreen assets");
126 }
127
128 // Make the startup image appear.
129 DrawStuff(0, 0);
130 Scale = 2;
131 CreateHeader();
132}
133
134//==========================================================================
135//

Callers

nothing calls this directly

Calls 6

I_ErrorFunction · 0.85
GetCachedBitmapMethod · 0.80
CreateMethod · 0.45
CheckNumForNameMethod · 0.45
GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected