//
// EnhancedGameObject::updateRotateAction from 0x1005d1610 to 0x1005d179f (399 bytes)
//
// 3 xrefs:
// > PlayLayer::updateVisibility @ 0x1000b79cb
// > LevelEditorLayer::updateVisibility @ 0x1000eaf83
// > LevelEditorLayer::updatePreviewAnim @ 0x1000f4347
//
// 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::updateRotateAction(EnhancedGameObject *a1, float a2)
{
float v3; // xmm0_4
__int64 v4; // rax
unsigned int *v5; // rax
_QWORD *v6; // r15
unsigned __int64 v7; // r12
__int64 v8; // r14
int v9; // eax
cocos2d::CCSprite *m_colorSprite; // rdi
__int64 v11; // rax
unsigned int *v12; // rax
_QWORD *v13; // r15
unsigned __int64 v14; // r12
__int64 v15; // r14
int v16; // eax
cocos2d::CCSprite *m_glowSprite; // rdi
__int64 v18; // rax
unsigned int *v19; // rax
_QWORD *v20; // r14
unsigned __int64 v21; // r15
__int64 v22; // rbx
int v23; // eax
float v24; // [rsp-2Ch] [rbp-2Ch]
if ( !a1->m_disableRotation )
{
v3 = a2 + a1->m_rotationAnimationSpeed;
a1->m_rotationAnimationSpeed = v3;
v24 = v3 * a1->m_rotationDelta;
v4 = ((__int64 (__fastcall *)(EnhancedGameObject *))a1->getChildren)(a1);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((_QWORD **)v5 + 2);
v7 = (unsigned __int64)&v6[*v5 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
v9 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v8 + 64LL))(*v6);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 344LL))(v8, (float)v9 + v24);
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
m_colorSprite = a1->m_colorSprite;
if ( !a1->m_colorSpriteLocked && m_colorSprite != nullptr )
{
v11 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))m_colorSprite->getChildren)(m_colorSprite);
if ( v11 )
{
v12 = *(unsigned int **)(v11 + 56);
if ( *v12 )
{
v13 = *((_QWORD **)v12 + 2);
v14 = (unsigned __int64)&v13[*v12 - 1];
do
{
v15 = *v13;
if ( !*v13 )
break;
v16 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v15 + 64LL))(*v13);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 344LL))(v15, (float)v16 + v24);
++v13;
}
while ( (unsigned __int64)v13 <= v14 );
}
}
}
m_glowSprite = a1->m_glowSprite;
if ( m_glowSprite )
{
v18 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))m_glowSprite->getChildren)(m_glowSprite);
if ( v18 )
{
v19 = *(unsigned int **)(v18 + 56);
if ( *v19 )
{
v20 = *((_QWORD **)v19 + 2);
v21 = (unsigned __int64)&v20[*v19 - 1];
do
{
v22 = *v20;
if ( !*v20 )
break;
v23 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v22 + 64LL))(*v20);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 344LL))(v22, (float)v23 + v24);
++v20;
}
while ( (unsigned __int64)v20 <= v21 );
}
}
}
}
}