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

Method Preview

engine/Poseidon/UI/DisplayUIMenus.cpp:626–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624void DisplayNewUser::Preview(RString speaker, float pitch)
625{
626 int index = ENGINE_CONFIG.singleVoice ? 1 : 0;
627 RString dir = (Pars >> "CfgVoice" >> speaker >> "directories")[index];
628 RString word = Pars >> "CfgVoice" >> "preview";
629 RString name = RString("voice\\") + dir + word + RString(".wss");
630
631 _previewSpeech = GSoundScene->OpenAndPlayOnce2D(name, 1, pitch, false);
632 if (_previewSpeech)
633 {
634 _previewSpeech->SetKind(WaveSpeech);
635 _head->AttachWave(_previewSpeech, pitch);
636 }
637}
638
639bool DisplayNewUser::CanDestroy()
640{
641 if (!Display::CanDestroy())
642 {

Callers

nothing calls this directly

Calls 4

OpenAndPlayOnce2DMethod · 0.80
RStringClass · 0.50
SetKindMethod · 0.45
AttachWaveMethod · 0.45

Tested by

no test coverage detected