//
// EditorUI::rotateObjects from 0x68fc64 to 0x690020 (956 bytes)
//
// 7 xrefs:
// > EditorUI::angleChanged @ 0x690158
// > EditorUI::transformObject @ 0x6938b8
// > EditorUI::transformObjectCall @ 0x6b9f78
// > EditorUI::transformObjectCall @ 0x6ba074
// > EditorUI::onCreateObject @ 0x6c02f4
// > EditorUI::createSmartObjectsFromTemplate @ 0x6c24a0
// > ??> @ 0x6ea48
//
// 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 EditorUI::rotateObjects(EditorUI *a1, cocos2d::CCArray *a2, float a3, cocos2d::CCPoint a4)
{
cocos2d::CCPoint *v4; // x2
cocos2d::CCPoint *v6; // x24
unsigned int v9; // w21
void (__fastcall *setRotationX)(GameObject *__hidden, float); // x27
float v11; // s0
void (__fastcall *setRotationY)(GameObject *__hidden, float); // x27
float v13; // s0
GameObject_vtbl *v14; // x1
float v15; // s0
GameObject_vtbl *v16; // x1
GameObject *v17; // x0
float v18; // s0
GameObject_vtbl *v19; // x1
GameObject *v20; // x0
__int64 v21; // x0
GameObject *v22; // x19
__int64 v23; // x0
float v24; // s13
float v25; // s0
float v26; // s15
float v27; // s14
float v28; // s0
float v29; // s15
float v30; // s0
GameObject_vtbl *v31; // x1
void (__fastcall *setRotation)(GameObject *__hidden, float); // x27
float v33; // s0
float v34; // s0
GameObject_vtbl *v35; // x1
GameObject *v36; // x0
void (__fastcall *v37)(GameObject *__hidden, float); // x27
float v38; // s0
void (__fastcall *v39)(GameObject *__hidden, float); // x27
float v40; // s0
__int64 v41; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v42; // [xsp+B0h] [xbp+B0h] BYREF
cocos2d::CCPoint v43; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v44; // [xsp+C0h] [xbp+C0h] BYREF
cocos2d::CCPoint GroupCenter; // 0:kr00_8.8
cocos2d::CCPoint v46; // 0:s0.4,4:s1.4
v6 = v4;
if ( (unsigned __int8)cocos2d::CCPoint::equals(v4, (const cocos2d::CCPoint *)&dword_1242110) )
{
GroupCenter = EditorUI::getGroupCenter(a1, a2, 0);
cocos2d::CCPoint::operator=(v6, GroupCenter.x, GroupCenter.y);
}
v9 = 0;
while ( v9 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v22 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v9);
v23 = (__int64)v22->getPosition(v22);
cocos2d::CCPoint::operator-(&v41, v23, v6);
v24 = sqrtf((float)(*((float *)&v41 + 1) * *((float *)&v41 + 1)) + (float)(*(float *)&v41 * *(float *)&v41));
v25 = atan2(*((float *)&v41 + 1), *(float *)&v41);
v26 = v25 - (float)(a3 * 0.017453);
v27 = cosf(v26);
v28 = sinf(v26);
cocos2d::CCPoint::CCPoint(&v43, v27, v28);
cocos2d::CCPoint::operator*(&v43, v24);
cocos2d::CCPoint::operator+(&v42, v6, &v44);
v29 = v22->getRotationX(v22);
v30 = v22->getRotationY(v22);
v31 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v29 != v30 )
{
setRotationX = v31->setRotationX;
v11 = v31->getRotationX(v22);
setRotationX(v22, a3 + v11);
setRotationY = v22->setRotationY;
v13 = v22->getRotationY(v22);
setRotationY(v22, a3 + v13);
v14 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v22->m_isDirty = 1;
v15 = v14->getRotationX(v22);
v16 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v17 = v22;
if ( v15 < 360.0 )
{
if ( v16->getRotationX(v22) > -360.0 )
{
LABEL_6:
v18 = v22->getRotationY(v22);
v19 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v20 = v22;
if ( v18 < 360.0 )
{
if ( v19->getRotationY(v22) > -360.0 )
goto LABEL_8;
v19 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v20 = v22;
}
v37 = v19->setRotationY;
v38 = v19->getRotationY(v20);
goto LABEL_15;
}
v16 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v17 = v22;
}
v39 = v16->setRotationX;
v40 = v16->getRotationX(v17);
v39(v22, (float)((int)v40 % 360));
goto LABEL_6;
}
setRotation = v31->setRotation;
v33 = v31->getRotation(v22);
setRotation(v22, a3 + v33);
v34 = v22->getRotation(v22);
v35 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v36 = v22;
if ( v34 < 360.0 )
{
if ( v35->getRotation(v22) > -360.0 )
goto LABEL_8;
v35 = v22->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v36 = v22;
}
v37 = v35->setRotation;
v38 = v35->getRotation(v36);
LABEL_15:
v37(v22, (float)((int)v38 % 360));
LABEL_8:
++v9;
v21 = (__int64)v22->getPosition(v22);
cocos2d::CCPoint::operator-(&v44, &v42, v21);
EditorUI::moveObject(a1, v22, v46);
}
}