//
// EnhancedGameObject::setupAnimationVariables from 0x10025da80 to 0x10025dbbe (318 bytes)
//
// 5 xrefs:
// > SetupAnimSettingsPopup::updateAnimSettings @ 0x10009b49a
// > SetupAnimSettingsPopup::updateAnimSettings @ 0x10009b4d2
// > SetupAnimSettingsPopup::onClose @ 0x10009b50c
// > SetupAnimSettingsPopup::onClose @ 0x10009b542
// > EnhancedGameObject::saveActiveColors @ 0x1005cc35a
//
// 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 EnhancedGameObject::setupAnimationVariables(EnhancedGameObject *a1)
{
GameManager *v1; // rax
cocos2d::CCObject *v2; // rax
__int16 v3; // ax
GameManager *v4; // rax
cocos2d::CCObject *v5; // rax
float v6; // xmm0_4
float m_randomFrameTime; // xmm0_4
float m_animationSpeed; // xmm1_4
bool m_disableDelayedLoop; // al
int m_objectID; // ecx
bool v11; // al
if ( a1->m_objectID != 2065 )
{
v1 = GameManager::sharedState();
v2 = cocos2d::CCDictionary::objectForKey(v1->m_framesForAnimation, a1->m_objectID);
if ( v2 )
v3 = (__int16)v2[1].__vftable;
else
v3 = 1;
a1->m_frames = v3;
v4 = GameManager::sharedState();
v5 = cocos2d::CCDictionary::objectForKey(v4->m_frameTimeForAnimation, a1->m_objectID);
if ( v5 )
v6 = *(float *)&v5[1].__vftable;
else
v6 = 1.0;
a1->m_frameTime = v6;
}
m_randomFrameTime = a1->m_randomFrameTime;
if ( a1->m_animationShouldUseSpeed )
{
m_animationSpeed = a1->m_animationSpeed;
if ( m_animationSpeed != 0.0 )
m_randomFrameTime = fabs(m_animationSpeed);
}
a1->m_frameTime = a1->m_frameTime / m_randomFrameTime;
if ( !GameObject::usesFreezeAnimation(a1) )
{
a1->m_visible = 0;
goto LABEL_16;
}
m_disableDelayedLoop = a1->m_disableDelayedLoop;
a1->m_visible = !m_disableDelayedLoop;
if ( m_disableDelayedLoop )
LABEL_16:
a1->m_isDisabled2 = 0;
m_objectID = a1->m_objectID;
a1->m_shouldNotHideAnimFreeze = m_objectID == 1855;
v11 = 1;
if ( m_objectID > 2891 )
{
if ( (unsigned int)(m_objectID - 2892) < 2 )
goto LABEL_23;
goto LABEL_21;
}
if ( (unsigned int)(m_objectID - 1839) >= 4 && m_objectID != 1591 && m_objectID != 1593 )
LABEL_21:
v11 = 0;
LABEL_23:
a1->m_usesSpecialAnimation = v11;
}