//
// SpriteAnimationManager::stopAnimations from 0x1007240e0 to 0x1007241aa (202 bytes)
//
// 10 xrefs:
// > AnimatedGameObject::init @ 0x1001b651f
// > AnimatedGameObject::updateObjectAnimation @ 0x1001b70ee
// > AnimatedGameObject::deactivateObject @ 0x1001b7391
// > AnimatedShopKeeper::create @ 0x1003248aa
// > AnimatedShopKeeper::init @ 0x10032875c
// > CCAnimatedSprite::tweenToAnimation @ 0x100350c2d
// > PlayerObject::ringJump @ 0x1004150cf
// > PlayerObject::toggleRobotMode @ 0x1004189e4
// > PlayerObject::toggleSpiderMode @ 0x100418e57
// > GJRobotSprite::init @ 0x1005dbe90
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SpriteAnimationManager::stopAnimations(SpriteAnimationManager *a1)
{
unsigned int sizex2; // eax
std::array *p_shortStorage; // rdi
std::size_t size; // rcx
size_t v5; // rdx
CCAnimatedSprite *m_sprite; // rax
cocos2d::CCNode *m_paSprite; // rdi
cocos2d::CCNode *m_fbfSprite; // rdi
_QWORD __s2[4]; // [rsp+9h] [rbp-27h] BYREF
strcpy((char *)__s2, "not_used");
sizex2 = a1->m_currentAnimation.m_data.m_short.sizex2;
p_shortStorage = &a1->m_currentAnimation.m_data.m_short.shortStorage;
size = sizex2 >> 1;
if ( (sizex2 & 1) != 0 )
{
p_shortStorage = (std::array *)a1->m_currentAnimation.m_data.m_long.longStorage;
size = a1->m_currentAnimation.m_data.m_long.size;
}
v5 = 8;
if ( size < 8 )
v5 = size;
if ( ((size == 8) & (memcmp(p_shortStorage, __s2, v5) == 0)) == 0 )
{
std::string::operator=((std::string *)&a1->m_nextAnimation, (const std::string *)&a1->m_currentAnimation);
std::string::assign((std::string *)&a1->m_currentAnimation, "not_used");
}
m_sprite = a1->m_sprite;
m_paSprite = m_sprite->m_paSprite;
if ( m_paSprite )
{
cocos2d::CCNode::stopAllActions(m_paSprite);
m_sprite = a1->m_sprite;
}
m_fbfSprite = m_sprite->m_fbfSprite;
if ( m_fbfSprite )
cocos2d::CCNode::stopAllActions(m_fbfSprite);
}