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

Method update_all

src/SB/Game/zTalkBox.cpp:1632–1679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1630}
1631
1632void ztalkbox::update_all(xScene& s, F32 dt)
1633{
1634 if (zGameIsPaused())
1635 {
1636 return;
1637 }
1638
1639 while (shared.state)
1640 {
1641 shared.delay_events = true;
1642 state_enum newtype = shared.state->update(s, dt);
1643
1644 if (newtype == shared.state->type)
1645 {
1646 break;
1647 }
1648
1649 shared.state->stop();
1650
1651 if (newtype == (state_enum)-1)
1652 {
1653 stop();
1654 break;
1655 }
1656
1657 shared.state = shared.states[newtype];
1658 shared.state->start();
1659 shared.delay_events = false;
1660 flush_triggered();
1661 }
1662
1663 if (shared.state && shared.active)
1664 {
1665 trigger_pads_enum tp = (trigger_pads_enum)shared.active->asset->trigger_pads;
1666
1667 if (tp == TP_ACTIVE && !globals.cmgr)
1668 {
1669 trigger_pads(*pad_pressed());
1670 }
1671 else if (tp == TP_TRAPPED && globals.cmgr)
1672 {
1673 trigger_pads(*pad_pressed());
1674 }
1675 }
1676
1677 shared.delay_events = false;
1678 flush_triggered();
1679}
1680namespace
1681{
1682 static U32* pad_pressed()

Callers

nothing calls this directly

Calls 8

zGameIsPausedFunction · 0.85
flush_triggeredFunction · 0.85
trigger_padsFunction · 0.85
pad_pressedFunction · 0.85
stopFunction · 0.70
updateMethod · 0.45
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected