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

Function xAnimPlaySetState

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

Source from the content-addressed store, hash-verified

1429}
1430
1431void xAnimPlaySetState(xAnimSingle* single, xAnimState* state, F32 startTime)
1432{
1433 EffectSingleStop(single);
1434 if (single->Blend)
1435 {
1436 EffectSingleStop(single->Blend);
1437 single->Blend->State = NULL;
1438 }
1439
1440 single->State = state;
1441 if (state == NULL)
1442 {
1443 return;
1444 }
1445
1446 single->Time =
1447 (state->Flags & 0x100 && startTime == 0.0f) ? state->Data->Duration * xurand() : startTime;
1448 single->CurrentSpeed = state->Speed;
1449 single->BilinearLerp[0] = 0.0f;
1450 single->BilinearLerp[1] = 0.0f;
1451 single->Effect = NULL;
1452 memset(single->ActiveList, 0, single->ActiveCount * sizeof(xAnimActiveEffect));
1453 single->LastTime = -1.0f;
1454 single->Sync = NULL;
1455
1456 if (single->Tran != NULL && single->Tran->Flags & 0x2)
1457 {
1458 xMemPoolFree(&sxAnimTempTranPool, single->Tran);
1459 }
1460
1461 single->Tran = NULL;
1462 single->BlendFactor = 0.0f;
1463}
1464
1465static void SingleUpdate(xAnimSingle* single, F32 timeDelta)
1466{

Callers 10

reset_lasso_animMethod · 0.85
zEntSimpleObj_InitFunction · 0.85
ResetMethod · 0.85
AnimSetStateMethod · 0.85
LassoSyncAnimsMethod · 0.85
startMethod · 0.85
zEntResetFunction · 0.85
zEntAnimEventFunction · 0.85
zEntAnimEvent_AutoAnimFunction · 0.85
xAnimPlaySetupFunction · 0.85

Calls 4

xurandFunction · 0.85
memsetFunction · 0.85
EffectSingleStopFunction · 0.70
xMemPoolFreeFunction · 0.70

Tested by

no test coverage detected