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

Function trigger_signal

src/SB/Game/zTalkBox.cpp:382–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380 }
381 }
382 static bool trigger_signal(const xtextbox::jot& j)
383 {
384 signal_context& c = *(signal_context*)&j.context;
385 static const U32 signals[20] = { 0x156, 0x157, 0x158, 0x159, 0x15A, 0x15B, 0x15C,
386 0x15D, 0x15E, 0x15F, 0x1C9, 0x1CA, 0x1CB, 0x1CC,
387 0x1CD, 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2 };
388
389 if (shared.quitting && !(c.flags & 0x80000000))
390 {
391 return true;
392 }
393
394 U32 flags = c.flags;
395
396 for (U32 i = 0; i < 20; i++)
397 {
398 if (flags & (1 << i))
399 {
400 trigger(signals[i]);
401 }
402 }
403
404 if (shared.cb)
405 {
406 shared.cb->on_signal(c.flags & 0x7FFFFFFF);
407 }
408
409 return true;
410 }
411 static bool load_sound_type(sound_context& c, const xtextbox::tag_entry_list& el)
412 {
413 xtextbox::tag_entry* e = xtextbox::find_entry(el, substr::create("volume", 6));

Callers

nothing calls this directly

Calls 2

triggerFunction · 0.70
on_signalMethod · 0.45

Tested by

no test coverage detected