MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ShowProgressScreen

Function ShowProgressScreen

Descent3/Mission.cpp:1601–1620  ·  view source on GitHub ↗

Shows some text on a background, useful for telling the player what is going on ie "Loading level...", "Receiving data...", etc

Source from the content-addressed store, hash-verified

1599// Shows some text on a background, useful for telling the player what is going on
1600// ie "Loading level...", "Receiving data...", etc
1601void ShowProgressScreen(const char *str, const char *str2, bool flip) {
1602 if (Dedicated_server) {
1603 PrintDedicatedMessage("%s\n", str);
1604 if (str2)
1605 PrintDedicatedMessage("%s\n", str2);
1606 return;
1607 }
1608 StartFrame(0, 0, Max_window_w, Max_window_h);
1609 rend_ClearScreen(GR_BLACK);
1610 grtext_SetFont(MENU_FONT);
1611 int text_height = grfont_GetHeight(MENU_FONT);
1612 grtext_SetColor(GR_WHITE);
1613 grtext_CenteredPrintf(0, Max_window_h / 2, str);
1614 if (str2)
1615 grtext_CenteredPrintf(0, (Max_window_h / 2) + (text_height * 2), str2);
1616 grtext_Flush();
1617 EndFrame();
1618 if (flip)
1619 rend_Flip();
1620}
1621/* does a mission briefing, returns if mission was canceled, a false, or 0 value.
1622 first displays mission goals and some warnings or advice.
1623 may allow for selection of player ships

Callers 13

SetNextLevelFunction · 0.85
GameRenderFrameFunction · 0.85
BailOnMultiplayerFunction · 0.85
MultiSendLeaveGameFunction · 0.85
MultiDoConnectBailFunction · 0.85
MultiDoServerQuitFunction · 0.85
ServerTimedOutFunction · 0.85
MultiDoClientFrameFunction · 0.85
InitGameScriptFunction · 0.85
TryToJoinServerFunction · 0.85
MultiPollForLevelInfoFunction · 0.85

Calls 10

PrintDedicatedMessageFunction · 0.85
StartFrameFunction · 0.85
grtext_SetFontFunction · 0.85
grfont_GetHeightFunction · 0.85
grtext_SetColorFunction · 0.85
grtext_CenteredPrintfFunction · 0.85
grtext_FlushFunction · 0.85
EndFrameFunction · 0.85
rend_ClearScreenFunction · 0.50
rend_FlipFunction · 0.50

Tested by

no test coverage detected