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

Function cb_dispatch

src/SB/Game/zTalkBox.cpp:1159–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1157
1158 if (mask == 0)
1159 {
1160 mask = 0xFFFFFFFF;
1161 }
1162
1163 e.stop_wait(mask);
1164 }
1165
1166 S32 cb_dispatch(xBase*, xBase* to, U32 event, const F32* argf, xBase*)
1167 {
1168 shared.delay_events = true;
1169 ztalkbox& e = *(ztalkbox*)to;
1170
1171 switch (event)
1172 {
1173 case eEventReset:
1174 case eEventSceneEnd:
1175 e.reset();
1176 break;
1177 case eEventInvisible:
1178 case eEventFastInvisible:
1179 e.hide();
1180 break;
1181 case eEventVisible:
1182 case eEventFastVisible:
1183 e.show();
1184 break;
1185 case eEventStartConversation:
1186 {
1187 U32 textID = ((U32*)argf == NULL) ? 0 : *(U32*)argf;
1188 e.start_talk(textID, NULL, NULL);
1189 flush_triggered();
1190 break;
1191 }
1192 case eEventEndConversation:
1193 e.stop_talk();
1194 flush_triggered();
1195 break;
1196 case eEventTalkBox_StopWait:
1197 if (argf == NULL)
1198 {
1199 stop_wait(e, NULL, 0);
1200 }
1201 else
1202 {
1203 stop_wait(e, argf, 4);
1204 }
1205 flush_triggered();
1206 break;
1207 case eEventSetText:
1208 if ((U32*)argf != NULL)
1209 {
1210 e.set_text(*(U32*)argf);
1211 }
1212 break;
1213 case eEventAddText:
1214 if ((U32*)argf != NULL)
1215 {
1216 e.add_text(*(U32*)argf);

Callers

nothing calls this directly

Calls 10

flush_triggeredFunction · 0.85
stop_waitFunction · 0.70
resetMethod · 0.45
hideMethod · 0.45
showMethod · 0.45
start_talkMethod · 0.45
stop_talkMethod · 0.45
set_textMethod · 0.45
add_textMethod · 0.45
clear_textMethod · 0.45

Tested by

no test coverage detected