MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / AddPhrase

Method AddPhrase

ogsr_engine/xrGame/PhraseDialog.cpp:236–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234void CPhraseDialog::SetPriority(int val) { data()->m_iPriority = val; }
235
236CPhrase* CPhraseDialog::AddPhrase(LPCSTR text, const shared_str& phrase_id, const shared_str& prev_phrase_id, int goodwil_level)
237{
238 CPhrase* phrase = NULL;
239 CPhraseGraph::CVertex* _vertex = data()->m_PhraseGraph.vertex(phrase_id);
240 if (!_vertex)
241 {
242 phrase = xr_new<CPhrase>();
243 VERIFY(phrase);
244 phrase->SetID(phrase_id);
245
246 phrase->SetText(text);
247 phrase->m_iGoodwillLevel = goodwil_level;
248
249 data()->m_PhraseGraph.add_vertex(phrase, phrase_id);
250 }
251
252 if (prev_phrase_id != "")
253 data()->m_PhraseGraph.add_edge(prev_phrase_id, phrase_id, 0.f);
254
255 return phrase;
256}
257
258void CPhraseDialog::AddPhrase(CUIXml* pXml, XML_NODE* phrase_node, const shared_str& phrase_id, const shared_str& prev_phrase_id)
259{

Callers

nothing calls this directly

Calls 11

SetIDMethod · 0.80
add_vertexMethod · 0.80
ReadIntMethod · 0.80
GetNodesNumMethod · 0.80
vertexMethod · 0.45
SetTextMethod · 0.45
add_edgeMethod · 0.45
ReadMethod · 0.45
LoadMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected