MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / TriWaitFrames

Function TriWaitFrames

engine/Poseidon/Game/Commands/GameStateExtTest.cpp:1597–1626  ·  view source on GitHub ↗

triWaitFrames — pump N render frames (clear + present). Keeps the window alive and advances the GPU pipeline without re-entering the script system. Returns "OK: ".

Source from the content-addressed store, hash-verified

1595 {
1596 IControl* ctrl = display->GetCtrl(idc);
1597 if (!ctrl || !ctrl->IsVisible())
1598 continue;
1599 std::string text = UITestEngine::GetControlText(ctrl);
1600 if (text.empty())
1601 continue;
1602 if (!out.empty())
1603 out += "|";
1604 out += text;
1605 }
1606 return GameValue(out.c_str());
1607}
1608
1609/// triMpSetupMessage - return DisplayMultiplayerSetup's immediate-mode wait text.
1610GameValue TriMpSetupMessage(const GameState* state)
1611{
1612 auto* display = GetActiveDisplayForSQF();
1613 auto* setup = dynamic_cast<DisplayMultiplayerSetup*>(display);
1614 if (!setup)
1615 {
1616 return GameValue("");
1617 }
1618 return GameValue((const char*)setup->GetMessageForTest());
1619}
1620
1621/// triMpTransferOverlayShows - return how many times the current multiplayer
1622/// setup entered the mission-transfer overlay.
1623GameValue TriMpTransferOverlayShows(const GameState* /*state*/)
1624{
1625 for (ControlsContainer* display = GetActiveDisplayForSQF(); display; display = display->Parent())
1626 {
1627 auto* setup = dynamic_cast<DisplayMultiplayerSetup*>(display);
1628 if (setup)
1629 {

Callers

nothing calls this directly

Calls 6

ProcessMessagesNoWaitFunction · 0.85
PackedColorClass · 0.50
GameValueClass · 0.50
InitDrawMethod · 0.45
FinishDrawMethod · 0.45
NextFrameMethod · 0.45

Tested by

no test coverage detected