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

Function xAnimPlaySetup

src/SB/Core/x/xAnim.cpp:1794–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1792}
1793
1794void xAnimPlaySetup(xAnimPlay* play, void* object, xAnimTable* table, xModelInstance* modelInst)
1795{
1796 play->BoneCount = modelInst->BoneCount;
1797 play->Object = object;
1798 play->Table = table;
1799 play->ModelInst = modelInst;
1800
1801 modelInst->Anim = play;
1802 modelInst->Flags |= 0x104;
1803
1804 if (table->MorphIndex != 0)
1805 {
1806 modelInst->Flags |= 0x80;
1807 }
1808
1809 for (S32 i = 0; i < play->NumSingle; ++i)
1810 {
1811 play->Single[i].SingleFlags = (1 << i & table->MorphIndex) ? 0x8000 : 0x1;
1812 play->Single[i].State = NULL;
1813 play->Single[i].Tran = NULL;
1814 if (play->Single[i].Blend != NULL)
1815 {
1816 play->Single[i].Blend->State = NULL;
1817 }
1818 }
1819 xAnimPlaySetState(play->Single, table->StateList, 0.0f);
1820}
1821
1822void xAnimPlayChooseTransition(xAnimPlay* play)
1823{

Callers 1

xAnimPoolAllocFunction · 0.70

Calls 1

xAnimPlaySetStateFunction · 0.85

Tested by

no test coverage detected