MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / MasterLoveSlave

Method MasterLoveSlave

src/SB/Game/zTalkBox.cpp:1549–1582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1547 }
1548}
1549void ztalkbox::MasterLoveSlave(xBase* slave, S32 starting)
1550{
1551 switch (slave->baseType)
1552 {
1553 case eBaseTypeGroup:
1554 {
1555 xGroup* grp = (xGroup*)slave;
1556 S32 cnt = xGroupGetCount(grp);
1557
1558 for (S32 i = 0; i < cnt; i++)
1559 {
1560 xBase* grpitem = xGroupGetItemPtr(grp, i);
1561 if (grpitem)
1562 {
1563 MasterLoveSlave(grpitem, starting);
1564 }
1565 }
1566 break;
1567 }
1568 case eBaseTypeNPC:
1569 {
1570 zNPCCommon* npc = (zNPCCommon*)slave;
1571 if (starting)
1572 {
1573 npc->SpeakBegin();
1574 }
1575 else
1576 {
1577 npc->SpeakEnd();
1578 }
1579 break;
1580 }
1581 }
1582}
1583void ztalkbox::load_settings(xIniFile& ini)
1584{
1585 shared.volume = xIniGetFloat(&ini, "talk_box.volume", 2.0f);

Callers

nothing calls this directly

Calls 5

xGroupGetCountFunction · 0.85
xGroupGetItemPtrFunction · 0.85
MasterLoveSlaveFunction · 0.85
SpeakBeginMethod · 0.45
SpeakEndMethod · 0.45

Tested by

no test coverage detected