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

Function ShowProgress

Source/interfac.cpp:66–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void ShowProgress(unsigned int uMsg)
67{
68 WNDPROC saveProc;
69
70 gbSomebodyWonGameKludge = FALSE;
71 plrmsg_delay(TRUE);
72
73 /// ASSERT: assert(ghMainWnd);
74 saveProc = SetWindowProc(DisableInputWndProc);
75
76 interface_msg_pump();
77 ClearScreenBuffer();
78 scrollrt_draw_game_screen(TRUE);
79 InitCutscene(uMsg);
80 BlackPalette();
81 DrawCutscene();
82 PaletteFadeIn(8);
83 IncProgress();
84 stream_update();
85 IncProgress();
86
87 switch (uMsg) {
88 case WM_DIABLOADGAME:
89 IncProgress();
90 IncProgress();
91 LoadGame(TRUE);
92 IncProgress();
93 IncProgress();
94 break;
95 case WM_DIABNEWGAME:
96 IncProgress();
97 FreeGameMem();
98 IncProgress();
99 pfile_remove_temp_files();
100 IncProgress();
101 LoadGameLevel(TRUE, 0);
102 IncProgress();
103 break;
104 case WM_DIABNEXTLVL:
105 IncProgress();
106 if (gbMaxPlayers == 1) {
107 SaveLevel();
108 } else {
109 DeltaSaveLevel();
110 }
111 IncProgress();
112 FreeGameMem();
113 currlevel++;
114 leveltype = gnLevelTypeTbl[currlevel];
115 /// ASSERT: assert(plr[myplr].plrlevel == currlevel);
116 IncProgress();
117 LoadGameLevel(FALSE, 0);
118 IncProgress();
119 break;
120 case WM_DIABPREVLVL:
121 IncProgress();
122 if (gbMaxPlayers == 1) {
123 SaveLevel();

Callers 2

start_gameFunction · 0.85
GM_GameFunction · 0.85

Calls 15

plrmsg_delayFunction · 0.85
SetWindowProcFunction · 0.85
interface_msg_pumpFunction · 0.85
ClearScreenBufferFunction · 0.85
InitCutsceneFunction · 0.85
BlackPaletteFunction · 0.85
DrawCutsceneFunction · 0.85
PaletteFadeInFunction · 0.85
IncProgressFunction · 0.85
stream_updateFunction · 0.85
LoadGameFunction · 0.85

Tested by

no test coverage detected