//
// EditorUI::getGroupCenter from 0x70d740 to 0x70d8b0 (368 bytes)
//
// 14 xrefs:
// > EditorUI::onCreateObject @ 0x4875f0
// > KeyframeGameObject::updateShadowObjects @ 0x4ec71c
// > EditorUI::handleEditorAction @ 0x6f205e
// > EditorUI::repositionObjectsToCenter @ 0x6f2976
// > EditorUI::copyObjectsDetailed @ 0x6f2c34
// > EditorUI::findObject @ 0x6f4d40
// > EditorUI::rotateObjects @ 0x70dca2
// > EditorUI::showTransformControl @ 0x70ea98
// > EditorUI::activateRotationControl @ 0x70ebdc
// > EditorUI::activateScaleControl @ 0x70eefc
// > EditorUI::alignObjectsOnAxis @ 0x70f136
// > EditorUI::alignObjects @ 0x70f434
// > EditorUI::scaleObjects @ 0x70f89c
// > EditorUI::transformObjects @ 0x70fba0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:42 +0000
//
EditorUI *__fastcall EditorUI::getGroupCenter(EditorUI *this, cocos2d::CCArray *a2, cocos2d::CCArray *a3, int a4)
{
float v7; // s16
unsigned int v8; // r6
GameObject *v9; // r5
float v10; // s17
float v11; // s18
float v12; // s19
GameObject *v13; // r5
float v14; // r1
float v15; // r2
int v16; // r3
const cocos2d::CCPoint *v17; // r1
cocos2d::CCPoint *v18; // r0
GameObject *v19; // r10
float v20; // r1
float v21; // r2
int v22; // r3
float v23; // s22
float v24; // s20
float v25; // s21
float v26; // r0
float v27; // s15
_BYTE v29[16]; // [sp+4h] [bp-18h] BYREF
if ( cocos2d::CCArray::count(a3) == 1 )
{
v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, 0);
GameObject::updateStartPos(v13, v14, v15, v16);
v17 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v13 + 96))(v13);
v18 = this;
LABEL_25:
cocos2d::CCPoint::CCPoint(v18, v17);
return this;
}
v7 = 1000000.0;
v8 = 0;
v9 = nullptr;
v10 = -1000000.0;
v11 = 1000000.0;
v12 = -1000000.0;
while ( v8 < cocos2d::CCArray::count(a3) )
{
v19 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, v8);
GameObject::updateStartPos(v19, v20, v21, v22);
(*(void (__fastcall **)(_BYTE *, GameObject *, int, int))(*(_DWORD *)v19 + 668))(v29, v19, 1065353216, 1065353216);
v23 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v29));
v24 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)v29));
v25 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v29));
v26 = COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)v29));
if ( v23 > v12 )
v12 = v23;
v27 = v26;
if ( v24 >= v11 && v11 != 0.0 )
v24 = v11;
if ( v25 > v10 )
v10 = v25;
if ( v26 >= v7 && v7 != 0.0 )
v27 = v7;
if ( *((_BYTE *)v19 + 1006) )
{
if ( v9 )
a4 = 1;
else
v9 = v19;
}
v7 = v27;
++v8;
v11 = v24;
}
if ( !v9 || a4 )
{
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v29,
v11 + (float)((float)(v12 - v11) * 0.5),
v7 + (float)((float)(v10 - v7) * 0.5));
v18 = this;
v17 = (const cocos2d::CCPoint *)v29;
goto LABEL_25;
}
(*(void (__fastcall **)(EditorUI *, GameObject *))(*(_DWORD *)v9 + 680))(this, v9);
return this;
}