| 737 | } |
| 738 | |
| 739 | void CancelAnimationCallbacks(HCollection collection, void* userdata1) |
| 740 | { |
| 741 | AnimWorld* const world = GetWorld(collection); |
| 742 | uint16_t* head_ptr = world->m_ListenerInstanceToIndex.Get((uintptr_t)userdata1); |
| 743 | if (0x0 != head_ptr) |
| 744 | { |
| 745 | uint16_t index = *head_ptr; |
| 746 | while (INVALID_INDEX != index) |
| 747 | { |
| 748 | uint16_t anim_index = world->m_AnimMap[index]; |
| 749 | Animation* const anim = &world->m_Animations[anim_index]; |
| 750 | |
| 751 | index = anim->m_NextListener; |
| 752 | |
| 753 | anim->m_PreviousListener = INVALID_INDEX; |
| 754 | anim->m_NextListener = INVALID_INDEX; |
| 755 | anim->m_AnimationStopped = 0x0; |
| 756 | anim->m_Userdata1 = 0x0; |
| 757 | anim->m_Userdata2 = 0x0; |
| 758 | } |
| 759 | world->m_ListenerInstanceToIndex.Erase((uintptr_t)userdata1); |
| 760 | } |
| 761 | } |
| 762 | } |
no test coverage detected