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

Function xAnimStateNewEffect

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

Source from the content-addressed store, hash-verified

691#endif
692
693xAnimEffect* xAnimStateNewEffect(xAnimState* state, U32 flags, F32 startTime, F32 endTime,
694 xAnimEffectCallback callback, U32 userDataSize)
695{
696 xAnimEffect* curr;
697 xAnimEffect** prev;
698 xAnimEffect* effect;
699
700 effect =
701 (gxAnimUseGrowAlloc ? (xAnimEffect*)xMemGrowAllocSize(userDataSize + sizeof(xAnimEffect)) :
702 (xAnimEffect*)xMemAllocSize(userDataSize + sizeof(xAnimEffect)));
703
704 effect->Flags = flags;
705 effect->StartTime = startTime;
706 effect->EndTime = endTime;
707 effect->Callback = callback;
708
709 prev = &state->Effects;
710 curr = state->Effects;
711
712 while (curr && startTime > curr->StartTime)
713 {
714 prev = &curr->Next;
715 curr = curr->Next;
716 }
717
718 effect->Next = curr;
719 *prev = effect;
720
721 return effect;
722}
723
724xAnimTable* xAnimTableNew(const char* name, xAnimTable** linkedList, U32 userFlags)
725{

Callers 1

ATBL_ReadFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected