//
// EditorUI::getGroupCenter from 0xc005e4 to 0xc007f8 (532 bytes)
//
// 15 xrefs:
// > EditorUI::onCreateObject @ 0x7ca48c
// > KeyframeGameObject::updateShadowObjects @ 0x888e90
// > EditorUI::handleEditorAction @ 0xbd7318
// > EditorUI::repositionObjectsToCenter @ 0xbd8d28
// > EditorUI::copyObjectsDetailed @ 0xbd92fc
// > EditorUI::findObject @ 0xbdd878
// > EditorUI::rotateObjects @ 0xc00d8c
// > EditorUI::showTransformControl @ 0xc022a0
// > EditorUI::activateRotationControl @ 0xc02468
// > EditorUI::activateScaleControl @ 0xc02984
// > EditorUI::alignObjectsOnAxis @ 0xc02dc8
// > EditorUI::alignObjects @ 0xc0342c
// > EditorUI::scaleObjects @ 0xc03900
// > EditorUI::transformObjects @ 0xc03fb4
// > ??> @ 0xb1778
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:03:48 +0000
//
cocos2d::CCPoint *__usercall EditorUI::getGroupCenter@(
cocos2d::CCPoint *__return_ptr a1@,
cocos2d::CCArray *a2@,
unsigned __int8 a3@)
{
unsigned int v6; // w24
float v7; // s9
unsigned int v8; // w20
float v9; // s13
GameObject *v10; // x23
float v11; // s10
float v12; // s14
GameObject *v13; // x21
float v14; // s0
float v15; // s12
float v16; // s0
float v17; // s8
float v18; // s0
float v19; // s11
float v20; // s0
GameObject *v22; // x19
const cocos2d::CCPoint *v23; // x0
_BYTE v24[16]; // [xsp+A8h] [xbp+A8h] BYREF
v6 = a3;
if ( (unsigned int)cocos2d::CCArray::count(a2) == 1 )
{
v22 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, 0);
GameObject::updateStartPos(v22);
v23 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v22 + 192LL))(v22);
cocos2d::CCPoint::CCPoint(a1, v23);
}
else
{
v7 = 1000000.0;
v8 = 0;
v9 = -1000000.0;
v10 = nullptr;
v11 = 1000000.0;
v12 = -1000000.0;
while ( v8 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v8);
GameObject::updateStartPos(v13);
(*(void (__fastcall **)(GameObject *, float, float))(*(_QWORD *)v13 + 1336LL))(v13, 1.0, 1.0);
cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v24);
v15 = v14;
cocos2d::CCRect::getMinX((cocos2d::CCRect *)v24);
v17 = v16;
cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v24);
v19 = v18;
cocos2d::CCRect::getMinY((cocos2d::CCRect *)v24);
if ( v12 < v15 )
v12 = v15;
if ( v11 <= v17 && v11 != 0.0 )
v17 = v11;
if ( v9 < v19 )
v9 = v19;
if ( v7 <= v20 && v7 != 0.0 )
v20 = v7;
if ( *((_BYTE *)v13 + 1150) )
{
if ( v10 )
v6 = 1;
else
v10 = v13;
}
v7 = v20;
++v8;
v11 = v17;
}
if ( (v10 != nullptr) > v6 )
{
(*(void (__fastcall **)(GameObject *))(*(_QWORD *)v10 + 1360LL))(v10);
}
else
{
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v24,
v11 + (float)((float)(v12 - v11) * 0.5),
v7 + (float)((float)(v9 - v7) * 0.5));
cocos2d::CCPoint::CCPoint(a1, (const cocos2d::CCPoint *)v24);
}
}
return a1;
}