//
// EditorUI::repositionObjectsToCenter from 0x1401c73f0 to 0x1401c7490 (160 bytes)
//
// 11 xrefs:
// > EditorUI::onCreateObject @ 0x1401b3094
// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6e8e
// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6f0f
// > EditorUI::createPrefab @ 0x1401b76bb
// > EditorUI::doPasteObjects @ 0x1401c60dd
// > EditorUI::spriteFromObjectString @ 0x1401f0b06
// > SetupSmartBlockLayer::onPasteTemplate @ 0x1405ed9d8
// > ??> @ 0x1408a2c08
// > ??> @ 0x1408a2c18
// > ??> @ 0x14091a7a4
// > ??> @ 0x14091a7b0
//
// This function is hookable on this platform (idp: pc, 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 11:28:05 +0000
//
unsigned int __fastcall EditorUI::repositionObjectsToCenter(__int64 a1, cocos2d::CCArray *a2, __int64 a3, __int64 a4)
{
unsigned int v7; // ebx
unsigned int result; // eax
struct cocos2d::CCObject *v9; // rdi
__int64 v10; // rax
_BYTE v11[8]; // [rsp+20h] [rbp-28h] BYREF
_BYTE v12[8]; // [rsp+28h] [rbp-20h] BYREF
_BYTE v13[24]; // [rsp+30h] [rbp-18h] BYREF
EditorUI::getGroupCenter(a1, v11, a2, a4);
cocos2d::CCPoint::operator-(a3, v12, v11);
v7 = 0;
result = cocos2d::CCArray::count(a2);
if ( result )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(a2, v7);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, (const struct cocos2d::CCPoint *)v12);
EditorUI::moveObject(a1, v9, v10);
++v7;
result = cocos2d::CCArray::count(a2);
}
while ( v7 < result );
}
return result;
}