| 69 | //========================================================================== |
| 70 | |
| 71 | FGenericStartScreen::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 | // |
nothing calls this directly
no test coverage detected