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

Method say

src/SB/Game/zNPCTypeVillager.cpp:1664–1703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1662}
1663
1664U8 zNPCNewsFish::say(say_enum s, S32 flags)
1665{
1666 U32 id = news_fish_audio_hash[s];
1667
1668 if (this->IsTalking())
1669 {
1670 if (id == this->currSoundID)
1671 {
1672 return 0;
1673 }
1674
1675 if (flags & 1)
1676 {
1677 this->SpeakStop();
1678 }
1679 else if (flags & 2)
1680 {
1681 if (this->nextSoundID != 0)
1682 {
1683 if (this->nextSoundID != this->currSoundID)
1684 {
1685 return 0;
1686 }
1687 }
1688 this->nextSoundID = id;
1689 return 1;
1690 }
1691 else
1692 {
1693 return 0;
1694 }
1695 }
1696
1697 this->soundHandle = xSndPlay(id, 1.0f, 0.0f, 0x80, 0, 0, SND_CAT_DIALOG, 0.0f);
1698 this->jawTime = 0.0f;
1699 this->jawData = xJaw_FindData(id);
1700 this->currSoundID = id;
1701
1702 return 1;
1703}
1704
1705S32 zNPCNewsFish::say(const say_enum* s, unsigned long size, S32 flags, S32 max_say)
1706{

Callers

nothing calls this directly

Calls 6

IsTalkingMethod · 0.95
get_saidMethod · 0.95
xrandFunction · 0.85
xSndPlayFunction · 0.50
xJaw_FindDataFunction · 0.50
SpeakStopMethod · 0.45

Tested by

no test coverage detected