//
// EditorUI::flipObjectsX from 0x693b40 to 0x693cf8 (440 bytes)
//
// 3 xrefs:
// > EditorUI::transformObjectCall @ 0x6b9fe8
// > EditorUI::createSmartObjectsFromTemplate @ 0x6c26d8
// > ??> @ 0xad508
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void EditorUI::flipObjectsX(EditorUI *a1, cocos2d::CCArray *a2)
{
unsigned int v4; // w19
float v5; // s8
float v6; // s9
GameObject *v7; // x21
float v8; // s0
float v9; // s10
float v10; // s0
unsigned int v11; // w21
unsigned int v12; // w1
GameObject *v13; // x19
__int64 v14; // x0
__int64 v15; // x0
float v16; // [xsp+70h] [xbp+70h]
cocos2d::CCPoint v17; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCRect v18; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCPoint v19; // 0:s0.4,4:s1.4
v4 = 0;
v5 = -9999.0;
v6 = -9999.0;
while ( v4 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v4);
GameObject::updateStartPos(v7);
((void (__fastcall *)(cocos2d::CCRect *__return_ptr, GameObject *, float, float))v7->getObjectRect_0)(
&v18,
v7,
1.0,
1.0);
cocos2d::CCRect::getMaxX(&v18);
v9 = v8;
cocos2d::CCRect::getMinX(&v18);
if ( v6 < v9 )
v6 = v9;
if ( v5 <= v10 && v5 != -9999.0 )
v10 = v5;
v5 = v10;
++v4;
EditorUI::transformObject(a1, v7, FlipX, 1);
}
v11 = 0;
while ( v11 < (unsigned int)cocos2d::CCArray::count(a2) )
{
v12 = v11++;
v13 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v12);
v16 = v6 - (float)(v13->getPosition(v13)->x - v5);
v14 = (__int64)v13->getPosition(v13);
cocos2d::CCPoint::CCPoint(&v17, v16, *(float *)(v14 + 4));
v15 = (__int64)v13->getPosition(v13);
cocos2d::CCPoint::operator-(&v18, &v17, v15);
EditorUI::moveObject(a1, v13, v19);
}
}