//
// EditorUI::getGroupCenter from 0x10015e5c4 to 0x10015e7c8 (516 bytes)
//
// 14 xrefs:
// > EditorUI::activateRotationControl @ 0x10015d304
// > EditorUI::rotateObjects @ 0x10015dbdc
// > EditorUI::scaleObjects @ 0x10015e958
// > sub_10015EB98 @ 0x10015ec0c
// > EditorUI::alignObjectsOnAxis @ 0x10015f118
// > EditorUI::alignObjects @ 0x10015f574
// > EditorUI::activateScaleControl @ 0x10015ffd4
// > EditorUI::showTransformControl @ 0x100160510
// > EditorUI::handleEditorAction @ 0x100163654
// > sub_10018A770 @ 0x10018a7c4
// > EditorUI::repositionObjectsToCenter @ 0x10018acf8
// > EditorUI::findObject @ 0x1001a6a8c
// > sub_100431674 @ 0x100431808
// > EditorUI::onCreateObject @ 0x10047757c
//
// 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 10:59:45 +0000
//
void __usercall EditorUI::getGroupCenter(__int64 a1@, char a2@, float *a3@)
{
__int64 v6; // x20
double *v7; // x0
_BYTE *v8; // x22
__int64 v9; // x23
float v10; // s11
float v11; // s12
float v12; // s13
float v13; // s14
_BYTE *v14; // x24
float v15; // s8
float v16; // s9
float v17; // s10
float v18; // s0
_BYTE *v21; // x10
_QWORD v22[2]; // [xsp+0h] [xbp-80h] BYREF
if ( (unsigned int)sub_1002E757C(a1) == 1 )
{
v6 = sub_1002E75A0(a1, 0);
GameObject::updateStartPos();
v7 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 192LL))(v6);
sub_1000262F4(a3, v7);
return;
}
if ( (unsigned int)sub_1002E757C(a1) )
{
v8 = nullptr;
v9 = 0;
v10 = 1000000.0;
v11 = -1000000.0;
v12 = -1000000.0;
v13 = 1000000.0;
do
{
v14 = (_BYTE *)sub_1002E75A0(a1, v9);
GameObject::updateStartPos();
(*(void (__fastcall **)(_QWORD *__return_ptr, _BYTE *, float, float))(*(_QWORD *)v14 + 1336LL))(
v22,
v14,
1.0,
1.0);
v15 = sub_10002656C((float *)v22);
v16 = sub_1000265A0((__int64)v22);
v17 = sub_1000265A8((__int64)v22);
v18 = sub_1000265DC((__int64)v22);
if ( v15 > v11 )
v11 = v15;
if ( v16 < v10 || v10 == 0.0 )
v10 = v16;
if ( v17 > v12 )
v12 = v17;
if ( v18 < v13 || v13 == 0.0 )
v13 = v18;
if ( v8 )
v21 = v8;
else
v21 = v14;
if ( v14[1150] == 1 )
{
a2 |= v8 != nullptr;
v8 = v21;
}
v9 = (unsigned int)(v9 + 1);
}
while ( (unsigned int)v9 < (unsigned int)sub_1002E757C(a1) );
if ( !((v8 == nullptr) | a2 & 1) )
{
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v8 + 1360LL))(v8);
return;
}
}
else
{
v10 = 1000000.0;
v11 = -1000000.0;
v12 = -1000000.0;
v13 = 1000000.0;
}
sub_1000262BC(a3, v10 + (float)((float)(v11 - v10) * 0.5), v13 + (float)((float)(v12 - v13) * 0.5));
}