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

Method start_talk

src/SB/Game/zTaskBox.cpp:62–94  ·  view source on GitHub ↗

Equivalent: branching weirdness

Source from the content-addressed store, hash-verified

60
61// Equivalent: branching weirdness
62void ztaskbox::start_talk(zNPCCommon* npc)
63{
64 ztaskbox* curr = this->current;
65 if (curr != NULL)
66 {
67 if (curr != this)
68 {
69 curr->set_callback(this->cb);
70 this->current->start_talk(NULL);
71 }
72 else
73 {
74 if (this->flag.enabled && this->state != STATE_INVALID)
75 {
76 if (shared != NULL && shared != this)
77 {
78 shared->stop_talk();
79 }
80 ztalkbox* talkbox = (ztalkbox*)zSceneFindObject(asset->talk_box);
81 if (talkbox != NULL)
82 {
83 U32 text = current->get_text(asset->stages[state]);
84 if (text != 0)
85 {
86 shared = this;
87 tcb->reset(*this);
88 talkbox->start_talk(text, tcb, npc);
89 }
90 }
91 }
92 }
93 }
94}
95
96void ztaskbox::stop_talk()
97{

Callers 4

cb_dispatchMethod · 0.45
update_stoppingMethod · 0.45
EnterMethod · 0.45
zTaxi_UpdateFunction · 0.45

Calls 5

zSceneFindObjectFunction · 0.85
set_callbackMethod · 0.80
stop_talkMethod · 0.45
get_textMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected