//
// EnhancedGameObject::updateAnimateOnTrigger from 0x52e448 to 0x52e4a0 (88 bytes)
//
// 0 xrefs:
//
// 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 EnhancedGameObject::updateAnimateOnTrigger(EnhancedGameObject *a1, bool a2)
{
EnhancedGameObject_vtbl *v3; // r3
EnhancedGameObject_vtbl *v4; // r3
void (__fastcall *updateSyncedAnimation)(EnhancedGameObject *__hidden, float, int); // r5
GameManager *v6; // r0
int v7; // r0
if ( a1->m_hasCustomAnimation && a1->m_animateOnTrigger )
{
if ( a2 )
{
v3 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_isDisabled2 = 0;
v3->setOpacity(a1, 255u);
a1->m_maybeAnimationVariableXInt = -1;
v4 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_animateOnTrigger = 0;
updateSyncedAnimation = v4->updateSyncedAnimation;
v6 = GameManager::sharedState();
v7 = GameManager::defaultFrameForAnimation(v6, a1->m_objectID);
((void (__fastcall *)(EnhancedGameObject *, _DWORD, int))updateSyncedAnimation)(a1, 0, v7);
a1->m_animateOnTrigger = 1;
}
else
{
EnhancedGameObject::waitForAnimationTrigger(a1);
}
}
}