MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / ShowProgress

Function ShowProgress

Source/interfac.cpp:286–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void ShowProgress(interface_mode uMsg)
287{
288 IsProgress = true;
289
290 gbSomebodyWonGameKludge = false;
291 plrmsg_delay(true);
292
293 EventHandler previousHandler = SetEventHandler(DisableInputEventHandler);
294
295 if (!HeadlessMode) {
296 assert(ghMainWnd);
297
298 interface_msg_pump();
299 ClearScreenBuffer();
300 scrollrt_draw_game_screen();
301
302 if (IsHardwareCursor())
303 SetHardwareCursorVisible(false);
304
305 BlackPalette();
306
307 // Blit the background once and then free it.
308 LoadCutsceneBackground(uMsg);
309 DrawCutsceneBackground();
310 if (RenderDirectlyToOutputSurface && PalSurface != nullptr) {
311 // Render into all the backbuffers if there are multiple.
312 const void *initialPixels = PalSurface->pixels;
313 if (DiabloUiSurface() == PalSurface)
314 BltFast(nullptr, nullptr);
315 RenderPresent();
316 while (PalSurface->pixels != initialPixels) {
317 DrawCutsceneBackground();
318 if (DiabloUiSurface() == PalSurface)
319 BltFast(nullptr, nullptr);
320 RenderPresent();
321 }
322 }
323 FreeCutsceneBackground();
324
325 PaletteFadeIn(8);
326 IncProgress();
327 sound_init();
328 IncProgress();
329 }
330
331 Player &myPlayer = *MyPlayer;
332
333 switch (uMsg) {
334 case WM_DIABLOADGAME:
335 IncProgress();
336 IncProgress();
337 LoadGame(true);
338 IncProgress();
339 IncProgress();
340 break;
341 case WM_DIABNEWGAME:
342 myPlayer.pOriginalCathedral = !gbIsHellfire;
343 IncProgress();

Callers 2

StartGameFunction · 0.85
GameEventHandlerFunction · 0.85

Calls 15

plrmsg_delayFunction · 0.85
SetEventHandlerFunction · 0.85
interface_msg_pumpFunction · 0.85
ClearScreenBufferFunction · 0.85
IsHardwareCursorFunction · 0.85
SetHardwareCursorVisibleFunction · 0.85
BlackPaletteFunction · 0.85
LoadCutsceneBackgroundFunction · 0.85
DrawCutsceneBackgroundFunction · 0.85
DiabloUiSurfaceFunction · 0.85
BltFastFunction · 0.85

Tested by

no test coverage detected