//
// EditorUI::flipObjectsX from 0x1401fff00 to 0x1402000e8 (488 bytes)
//
// 5 xrefs:
// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6eb6
// > EditorUI::transformObjectCall_1 @ 0x1401ff673
// > ??> @ 0x1408a3b78
// > ??> @ 0x1408a3bac
// > ??> @ 0x14091ad2c
//
// 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:13 +0000
//
unsigned int __fastcall EditorUI::flipObjectsX(__int64 a1, cocos2d::CCArray *a2)
{
unsigned int v3; // r14d
unsigned int v5; // ebx
float v6; // xmm10_4
float i; // xmm7_4
struct cocos2d::CCObject *v8; // rdi
float MaxX; // xmm6_4
float MinX; // xmm0_4
unsigned int result; // eax
struct cocos2d::CCObject *v12; // rdi
float v13; // xmm6_4
__int64 v14; // rbx
__int64 v15; // rax
__int64 v16; // rax
_BYTE v17[16]; // [rsp+20h] [rbp-78h] BYREF
char v18; // [rsp+B0h] [rbp+18h] BYREF
char v19; // [rsp+B8h] [rbp+20h] BYREF
v3 = 0;
v5 = 0;
v6 = -9999.0;
for ( i = -9999.0; v5 < cocos2d::CCArray::count(a2); ++v5 )
{
v8 = cocos2d::CCArray::objectAtIndex(a2, v5);
GameObject::updateStartPos(v8);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v8 + 1176LL))(v8, v17);
MaxX = cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v17);
MinX = cocos2d::CCRect::getMinX((cocos2d::CCRect *)v17);
v6 = fmaxf(MaxX, v6);
if ( i > MinX || i == -9999.0 )
i = MinX;
EditorUI::transformObject(a1, (__int64)v8, 37, 1);
}
result = cocos2d::CCArray::count(a2);
if ( result )
{
do
{
v12 = cocos2d::CCArray::objectAtIndex(a2, v3);
v13 = v6
- (float)(*(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v12 + 200LL))(v12) - i);
v14 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v12 + 200LL))(v12);
v15 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v12 + 200LL))(v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v19, v13, *(float *)(v15 + 4));
cocos2d::CCPoint::operator-(v16, &v18, v14);
EditorUI::moveObject(a1, (__int64)v12, (__int64)&v18);
++v3;
result = cocos2d::CCArray::count(a2);
}
while ( v3 < result );
}
return result;
}